33 OUT EFI_IMAGE_ID *ImageId,
39 Private = HII_IMAGE_EX_DATABASE_PRIVATE_DATA_FROM_THIS (This);
40 return HiiNewImage (&Private->HiiImage, PackageList, ImageId, Image);
73 IN EFI_IMAGE_ID ImageId,
79 Private = HII_IMAGE_EX_DATABASE_PRIVATE_DATA_FROM_THIS (This);
80 return IGetImage (&Private->DatabaseList, PackageList, ImageId, Image,
FALSE);
107 IN EFI_IMAGE_ID ImageId,
113 Private = HII_IMAGE_EX_DATABASE_PRIVATE_DATA_FROM_THIS (This);
114 return HiiSetImage (&Private->HiiImage, PackageList, ImageId, Image);
158 Private = HII_IMAGE_EX_DATABASE_PRIVATE_DATA_FROM_THIS (This);
159 return HiiDrawImage (&Private->HiiImage, Flags, Image, Blt, BltX, BltY);
204 IN EFI_IMAGE_ID ImageId,
216 if ((This ==
NULL) || (Blt ==
NULL)) {
217 return EFI_INVALID_PARAMETER;
224 if (EFI_ERROR (Status)) {
232 if (Image.Bitmap !=
NULL) {
257 UINT16 NumberOfDecoderName;
258 UINT16 DecoderNameIndex;
262 case EFI_HII_IIBT_IMAGE_JPEG:
263 DecoderName = &gEfiHiiImageDecoderNameJpegGuid;
266 case EFI_HII_IIBT_IMAGE_PNG:
267 DecoderName = &gEfiHiiImageDecoderNamePngGuid;
275 Status =
gBS->LocateHandleBuffer (
ByProtocol, &gEfiHiiImageDecoderProtocolGuid,
NULL, &HandleNum, &Handles);
276 if (EFI_ERROR (Status)) {
280 for (Index = 0; Index < HandleNum; Index++) {
281 Status =
gBS->HandleProtocol (Handles[Index], &gEfiHiiImageDecoderProtocolGuid, (VOID **)&Decoder);
282 if (EFI_ERROR (Status)) {
286 Status = Decoder->GetImageDecoderName (Decoder, &DecoderNames, &NumberOfDecoderName);
287 if (EFI_ERROR (Status)) {
291 for (DecoderNameIndex = 0; DecoderNameIndex < NumberOfDecoderName; DecoderNameIndex++) {
292 if (
CompareGuid (DecoderName, &DecoderNames[DecoderNameIndex])) {
329 IN EFI_IMAGE_ID ImageId,
341 if ((Image ==
NULL) || (ImageId == 0)) {
342 return EFI_INVALID_PARAMETER;
345 Private = HII_IMAGE_EX_DATABASE_PRIVATE_DATA_FROM_THIS (This);
347 if (PackageListNode ==
NULL) {
348 return EFI_NOT_FOUND;
351 ImagePackage = PackageListNode->ImagePkg;
352 if (ImagePackage ==
NULL) {
353 return EFI_NOT_FOUND;
360 if (CurrentImageBlock ==
NULL) {
361 return EFI_NOT_FOUND;
364 switch (CurrentImageBlock->BlockType) {
365 case EFI_HII_IIBT_IMAGE_JPEG:
366 case EFI_HII_IIBT_IMAGE_PNG:
368 if (Decoder ==
NULL) {
369 return EFI_UNSUPPORTED;
385 Status = Decoder->GetImageInfo (
396 if (!EFI_ERROR (Status)) {
397 Image->Height = ImageInfo->ImageHeight;
398 Image->Width = ImageInfo->ImageWidth;
399 Image->Image.Bitmap =
NULL;
405 case EFI_HII_IIBT_IMAGE_1BIT_TRANS:
406 case EFI_HII_IIBT_IMAGE_4BIT_TRANS:
407 case EFI_HII_IIBT_IMAGE_8BIT_TRANS:
408 case EFI_HII_IIBT_IMAGE_1BIT:
409 case EFI_HII_IIBT_IMAGE_4BIT:
410 case EFI_HII_IIBT_IMAGE_8BIT:
416 Image->Image.Bitmap =
NULL;
419 case EFI_HII_IIBT_IMAGE_24BIT_TRANS:
420 case EFI_HII_IIBT_IMAGE_24BIT:
423 Image->Image.Bitmap =
NULL;
427 return EFI_NOT_FOUND;
UINT16 EFIAPI ReadUnaligned16(IN CONST UINT16 *Buffer)
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
VOID EFIAPI FreePool(IN VOID *Buffer)
UINT32 EFI_HII_DRAW_FLAGS
EFI_STATUS EFIAPI HiiGetImageEx(IN CONST EFI_HII_IMAGE_EX_PROTOCOL *This, IN EFI_HII_HANDLE PackageList, IN EFI_IMAGE_ID ImageId, OUT EFI_IMAGE_INPUT *Image)
EFI_STATUS EFIAPI HiiDrawImageIdEx(IN CONST EFI_HII_IMAGE_EX_PROTOCOL *This, IN EFI_HII_DRAW_FLAGS Flags, IN EFI_HII_HANDLE PackageList, IN EFI_IMAGE_ID ImageId, IN OUT EFI_IMAGE_OUTPUT **Blt, IN UINTN BltX, IN UINTN BltY)
EFI_STATUS EFIAPI HiiSetImageEx(IN CONST EFI_HII_IMAGE_EX_PROTOCOL *This, IN EFI_HII_HANDLE PackageList, IN EFI_IMAGE_ID ImageId, IN CONST EFI_IMAGE_INPUT *Image)
EFI_STATUS EFIAPI HiiGetImageInfo(IN CONST EFI_HII_IMAGE_EX_PROTOCOL *This, IN EFI_HII_HANDLE PackageList, IN EFI_IMAGE_ID ImageId, OUT EFI_IMAGE_OUTPUT *Image)
EFI_STATUS EFIAPI HiiNewImageEx(IN CONST EFI_HII_IMAGE_EX_PROTOCOL *This, IN EFI_HII_HANDLE PackageList, OUT EFI_IMAGE_ID *ImageId, IN CONST EFI_IMAGE_INPUT *Image)
EFI_HII_IMAGE_DECODER_PROTOCOL * LocateHiiImageDecoder(UINT8 BlockType)
EFI_STATUS EFIAPI HiiDrawImageEx(IN CONST EFI_HII_IMAGE_EX_PROTOCOL *This, IN EFI_HII_DRAW_FLAGS Flags, IN CONST EFI_IMAGE_INPUT *Image, IN OUT EFI_IMAGE_OUTPUT **Blt, IN UINTN BltX, IN UINTN BltY)
EFI_HII_IMAGE_BLOCK * GetImageIdOrAddress(IN EFI_HII_IMAGE_BLOCK *ImageBlocks, IN OUT EFI_IMAGE_ID *ImageId)
EFI_STATUS IGetImage(IN LIST_ENTRY *Database, IN EFI_HII_HANDLE PackageList, IN EFI_IMAGE_ID ImageId, OUT EFI_IMAGE_INPUT *Image, IN BOOLEAN BitmapOnly)
HII_DATABASE_PACKAGE_LIST_INSTANCE * LocatePackageList(IN LIST_ENTRY *Database, IN EFI_HII_HANDLE PackageList)
EFI_STATUS EFIAPI HiiDrawImage(IN CONST EFI_HII_IMAGE_PROTOCOL *This, IN EFI_HII_DRAW_FLAGS Flags, IN CONST EFI_IMAGE_INPUT *Image, IN OUT EFI_IMAGE_OUTPUT **Blt, IN UINTN BltX, IN UINTN BltY)
EFI_STATUS EFIAPI HiiNewImage(IN CONST EFI_HII_IMAGE_PROTOCOL *This, IN EFI_HII_HANDLE PackageList, OUT EFI_IMAGE_ID *ImageId, IN CONST EFI_IMAGE_INPUT *Image)
EFI_STATUS EFIAPI HiiSetImage(IN CONST EFI_HII_IMAGE_PROTOCOL *This, IN EFI_HII_HANDLE PackageList, IN EFI_IMAGE_ID ImageId, IN CONST EFI_IMAGE_INPUT *Image)
#define OFFSET_OF(TYPE, Field)