diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2016-09-21 10:39:11 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2016-09-27 09:43:28 +0800 |
commit | 333ba578fef4dff8921051410c5b56f63e7eeadb (patch) | |
tree | 004d6532069ebe11d388ae3453a287976b671d12 /BaseTools/Source/Python/AutoGen/StrGather.py | |
parent | 4f0ae88cde9caf65cbb9f534ce2b28d14add1e0d (diff) | |
download | edk2-333ba578fef4dff8921051410c5b56f63e7eeadb.tar.gz edk2-333ba578fef4dff8921051410c5b56f63e7eeadb.tar.bz2 edk2-333ba578fef4dff8921051410c5b56f63e7eeadb.zip |
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>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/StrGather.py')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/StrGather.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/AutoGen/StrGather.py b/BaseTools/Source/Python/AutoGen/StrGather.py index 60840041ba..ed33554cd7 100644 --- a/BaseTools/Source/Python/AutoGen/StrGather.py +++ b/BaseTools/Source/Python/AutoGen/StrGather.py @@ -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
|