]>
Commit | Line | Data |
---|---|---|
345c2b07 RN |
1 | /** @file\r |
2 | This library provides image decoding service by managing the different\r | |
3 | image decoding libraries.\r | |
4 | \r | |
5 | Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r | |
6 | This program and the accompanying materials are licensed and made available under\r | |
7 | the terms and conditions of the BSD License that accompanies this distribution.\r | |
8 | The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php.\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | **/\r | |
15 | #ifndef __IMAGE_DECODER_LIB_H__\r | |
16 | #define __IMAGE_DECODER_LIB_H__\r | |
17 | #include <Protocol/PlatformLogo.h>\r | |
18 | \r | |
19 | typedef\r | |
20 | EFI_STATUS\r | |
21 | (EFIAPI *DECODE_IMAGE)(\r | |
22 | IN IMAGE_FORMAT ImageFormat,\r | |
23 | IN UINT8 *Image,\r | |
24 | IN UINTN ImageSize,\r | |
25 | OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL **GopBlt,\r | |
26 | OUT UINTN *GopBltSize,\r | |
27 | OUT UINTN *PixelWidth,\r | |
28 | OUT UINTN *PixelHeight\r | |
29 | );\r | |
30 | \r | |
31 | /**\r | |
32 | Convert a graphics image to a callee allocated GOP blt buffer.\r | |
33 | \r | |
34 | @param ImageFormat Format of the image file.\r | |
35 | @param Image Pointer to image file.\r | |
36 | @param ImageSize Number of bytes in Image.\r | |
37 | @param GopBlt Buffer containing GOP version of Image.\r | |
38 | @param GopBltSize Size of GopBlt in bytes.\r | |
39 | @param PixelWidth Width of GopBlt/Image in pixels.\r | |
40 | @param PixelHeight Height of GopBlt/Image in pixels.\r | |
41 | \r | |
42 | @retval EFI_SUCCESS GopBlt and GopBltSize are returned.\r | |
43 | @retval EFI_INVALID_PARAMETER GopBlt or GopBltSize is NULL.\r | |
44 | @retval EFI_INVALID_PARAMETER Image is NULL or ImageSize is 0.\r | |
45 | @retval EFI_UNSUPPORTED Image is not supported.\r | |
46 | @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate.\r | |
47 | \r | |
48 | **/\r | |
49 | EFI_STATUS\r | |
50 | EFIAPI\r | |
51 | DecodeImage (\r | |
52 | IN IMAGE_FORMAT ImageFormat,\r | |
53 | IN UINT8 *Image,\r | |
54 | IN UINTN ImageSize,\r | |
55 | OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL **GopBlt,\r | |
56 | OUT UINTN *GopBltSize,\r | |
57 | OUT UINTN *PixelWidth,\r | |
58 | OUT UINTN *PixelHeight\r | |
59 | );\r | |
60 | \r | |
61 | /**\r | |
62 | Register an image decoder.\r | |
63 | \r | |
64 | @param Decoder An image decoder.\r | |
65 | \r | |
66 | @retval EFI_SUCCESS The decoder was successfully registered.\r | |
67 | @retval EFI_OUT_OF_RESOURCES No enough resource to register the decoder.\r | |
68 | \r | |
69 | **/\r | |
70 | EFI_STATUS\r | |
71 | EFIAPI\r | |
72 | RegisterImageDecoder (\r | |
73 | IN DECODE_IMAGE Decoder\r | |
74 | );\r | |
75 | \r | |
76 | #endif\r |