* [RFC] Image definition file for HII Image package
@ 2016-08-11 12:01 Gao, Liming
0 siblings, 0 replies; only message in thread
From: Gao, Liming @ 2016-08-11 12:01 UTC (permalink / raw)
To: edk2-devel@lists.01.org
Hi, all
This proposal is to add support of HII Image package generation in edk2 BaseTools. Like uni file for HII string package, it includes the following things. Please help review and raise your comments.
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".
a. IMAGE_ID is macro name. IMAGE_TOKEN (IMAGE_ID) is referred in other source files.
b. TRANSPARENT is optional. If it is specified, BaseTools will add TRANS image block type for the input ImageFile. UEFI spec doesn't define TRANS JPG and PNG block type. So, this flag is ignored for JPG and PNG image.
c. ImageFileName is also listed in [Sources] section of INF, and its file extension is one of .bmp, .jpg, .png (case insensitive).
d. BaseTools parses idf files and gets every image file, then bases on file extension to generate the different image block data, last combine them and output HII image package.
i. If more than one idf files are listed in [Sources] section of one INF, they will be merged and parsed.
ii. If the image file is not found or its file extension is unsupported, BaseTools will report build error.
iii. If the file extension is bmp, BaseTools will convert it convert it to EFI_HII_IIBT_IMAGE_BLOCK and EFI_HII_IMAGE_PALETTE_INFO.
iv. If the file extension is jpg, BaseTools will only check 'JFIF' signature at offset 6 in the image file, then add it into EFI_HII_IIBT_JPEG_BLOCK.
v. If the file extension is png, BaseTools directly adds it into EFI_HII_IIBT_PNG_BLOCK without any check.
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.
Sample.idf:
#image IMG_LOGO TRANSPARENT Logo.bmp
#image IMG_FULL_LOGO Logo.jpg
#image IMG_OEM_LOGO Logo.png
Thanks
Liming
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-08-11 12:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-11 12:01 [RFC] Image definition file for HII Image package Gao, Liming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox