TianoCore EDK2 master
Loading...
Searching...
No Matches
HiiImageDecoder.h
Go to the documentation of this file.
1
14#ifndef __HII_IMAGE_DECODER_H__
15#define __HII_IMAGE_DECODER_H__
16
17#include <Protocol/HiiImage.h>
18
19#define EFI_HII_IMAGE_DECODER_PROTOCOL_GUID \
20 {0x9e66f251, 0x727c, 0x418c, { 0xbf, 0xd6, 0xc2, 0xb4, 0x25, 0x28, 0x18, 0xea }}
21
22#define EFI_HII_IMAGE_DECODER_NAME_JPEG_GUID \
23 {0xefefd093, 0xd9b, 0x46eb, { 0xa8, 0x56, 0x48, 0x35, 0x7, 0x0, 0xc9, 0x8 }}
24
25#define EFI_HII_IMAGE_DECODER_NAME_PNG_GUID \
26 {0xaf060190, 0x5e3a, 0x4025, { 0xaf, 0xbd, 0xe1, 0xf9, 0x5, 0xbf, 0xaa, 0x4c }}
27
29
30typedef enum {
31 EFI_HII_IMAGE_DECODER_COLOR_TYPE_RGB = 0x0,
32 EFI_HII_IMAGE_DECODER_COLOR_TYPE_RGBA = 0x1,
33 EFI_HII_IMAGE_DECODER_COLOR_TYPE_CMYK = 0x2,
34 EFI_HII_IMAGE_DECODER_COLOR_TYPE_UNKNOWN = 0xFF
35} EFI_HII_IMAGE_DECODER_COLOR_TYPE;
36
37//
38// EFI_HII_IMAGE_DECODER_IMAGE_INFO_HEADER
39//
40// DecoderName Name of the decoder
41// ImageInfoSize The size of entire image information structure in bytes
42// ImageWidth The image width
43// ImageHeight The image height
44// ColorType The color type, see EFI_HII_IMAGE_DECODER_COLOR_TYPE.
45// ColorDepthInBits The color depth in bits
46//
48 EFI_GUID DecoderName;
49 UINT16 ImageInfoSize;
50 UINT16 ImageWidth;
51 UINT16 ImageHeight;
52 EFI_HII_IMAGE_DECODER_COLOR_TYPE ColorType;
53 UINT8 ColorDepthInBits;
55
56#define EFI_IMAGE_JPEG_SCANTYPE_PROGREESSIVE 0x01
57#define EFI_IMAGE_JPEG_SCANTYPE_INTERLACED 0x02
58
59//
60// EFI_HII_IMAGE_DECODER_JPEG_INFO
61// Header The common header
62// ScanType The scan type of JPEG image
63// Reserved Reserved
64//
67 UINT16 ScanType;
68 UINT64 Reserved;
70
71//
72// EFI_HII_IMAGE_DECODER_PNG_INFO
73// Header The common header
74// Channels Number of channels in the PNG image
75// Reserved Reserved
76//
79 UINT16 Channels;
80 UINT64 Reserved;
82
83//
84// EFI_HII_IMAGE_DECODER_OTHER_INFO
85//
88 CHAR16 ImageExtenion[1];
89 //
90 // Variable length of image file extension name.
91 //
93
113typedef
117 IN OUT EFI_GUID **DecoderName,
118 IN OUT UINT16 *NumberOfDecoderName
119 );
120
141typedef
145 IN VOID *Image,
146 IN UINTN SizeOfImage,
148 );
149
180typedef
184 IN VOID *Image,
185 IN UINTN ImageRawDataSize,
186 IN OUT EFI_IMAGE_OUTPUT **Bitmap,
187 IN BOOLEAN Transparent
188 );
189
191 EFI_HII_IMAGE_DECODER_GET_NAME GetImageDecoderName;
194};
195
196extern EFI_GUID gEfiHiiImageDecoderProtocolGuid;
197extern EFI_GUID gEfiHiiImageDecoderNameJpegGuid;
198extern EFI_GUID gEfiHiiImageDecoderNamePngGuid;
199
200#endif
UINT64 UINTN
EFI_STATUS(EFIAPI * EFI_HII_IMAGE_DECODER_GET_IMAGE_INFO)(IN EFI_HII_IMAGE_DECODER_PROTOCOL *This, IN VOID *Image, IN UINTN SizeOfImage, IN OUT EFI_HII_IMAGE_DECODER_IMAGE_INFO_HEADER **ImageInfo)
EFI_STATUS(EFIAPI * EFI_HII_IMAGE_DECODER_GET_NAME)(IN EFI_HII_IMAGE_DECODER_PROTOCOL *This, IN OUT EFI_GUID **DecoderName, IN OUT UINT16 *NumberOfDecoderName)
EFI_STATUS(EFIAPI * EFI_HII_IMAGE_DECODER_DECODE)(IN EFI_HII_IMAGE_DECODER_PROTOCOL *This, IN VOID *Image, IN UINTN ImageRawDataSize, IN OUT EFI_IMAGE_OUTPUT **Bitmap, IN BOOLEAN Transparent)
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
Definition: Base.h:213