BaseTools: support generating image package from BMP/JPEG/PNG files
BaseTools add support to generating image package from BMP/JPEG/PNG files. 1) New file type *.idf Image definition file to describe HII image resource. It is the ASCII text file, and includes one or more "#image IMAGE_ID [TRANSPARENT] ImageFileName". 2) New IMAGE_TOKEN macro is used to refer to IMAGE_ID. 3) New AutoGen header file $(MODULE_NAME)ImgDefs.h to include the generated ImageId definition. 4) New $(MODULE_NAME)Idf.hpk or $(MODULE_NAME)Images are generated as the output binary HII image package. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@ -19,7 +19,7 @@ import Common.EdkLogger as EdkLogger
|
||||
from Common.BuildToolError import *
|
||||
from UniClassObject import *
|
||||
from StringIO import StringIO
|
||||
from struct import pack
|
||||
from struct import pack, unpack
|
||||
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||
|
||||
##
|
||||
@ -131,7 +131,7 @@ def DecToHexList(Dec, Digit = 8):
|
||||
def AscToHexList(Ascii):
|
||||
List = []
|
||||
for Item in Ascii:
|
||||
List.append('0x%2X' % ord(Item))
|
||||
List.append('0x%02X' % ord(Item))
|
||||
|
||||
return List
|
||||
|
||||
|
Reference in New Issue
Block a user