OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
AppleImageConversion.h File Reference
#include <Protocol/UgaDraw.h>

Go to the source code of this file.

Data Structures

struct  APPLE_IMAGE_CONVERSION_PROTOCOL_
 

Macros

#define APPLE_IMAGE_CONVERSION_PROTOCOL_GUID
 
#define APPLE_IMAGE_CONVERSION_PROTOCOL_REVISION   0x20000
 
#define APPLE_IMAGE_CONVERSION_PROTOCOL_ANY_EXTENSION   0
 

Typedefs

typedef EFI_STATUS(EFIAPI * RECOGNIZE_IMAGE_DATA) (IN VOID *ImageBuffer, IN UINTN ImageSize)
 
typedef EFI_STATUS(EFIAPI * GET_IMAGE_DIMS) (IN VOID *ImageBuffer, IN UINTN ImageSize, OUT UINT32 *ImageWidth, OUT UINT32 *ImageHeight)
 
typedef EFI_STATUS(EFIAPI * DECODE_IMAGE_DATA) (IN VOID *ImageBuffer, IN UINTN ImageSize, IN OUT EFI_UGA_PIXEL **RawImageData, IN OUT UINTN *RawImageDataSize)
 
typedef EFI_STATUS(EFIAPI * GET_IMAGE_DIMS_EX) (IN VOID *ImageBuffer, IN UINTN ImageSize, IN UINTN Scale, OUT UINT32 *ImageWidth, OUT UINT32 *ImageHeight)
 
typedef EFI_STATUS(EFIAPI * DECODE_IMAGE_DATA_EX) (IN VOID *ImageBuffer, IN UINTN ImageSize, IN UINTN Scale, IN OUT EFI_UGA_PIXEL **RawImageData, IN OUT UINTN *RawImageDataSize)
 
typedef struct APPLE_IMAGE_CONVERSION_PROTOCOL_ APPLE_IMAGE_CONVERSION_PROTOCOL
 

Variables

EFI_GUID gAppleImageConversionProtocolGuid
 

Detailed Description

Copyright (C) 2012, tiamo. All rights reserved.
Copyright (C) 2014, dmazar. All rights reserved.
Copyright (C) 2018, savvas. All rights reserved.
Copyright (C) 2018, Download-Fritz. All rights reserved.
Copyright (C) 2019-2020, vit9696. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php.

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file AppleImageConversion.h.

Macro Definition Documentation

◆ APPLE_IMAGE_CONVERSION_PROTOCOL_ANY_EXTENSION

#define APPLE_IMAGE_CONVERSION_PROTOCOL_ANY_EXTENSION   0

Definition at line 37 of file AppleImageConversion.h.

◆ APPLE_IMAGE_CONVERSION_PROTOCOL_GUID

#define APPLE_IMAGE_CONVERSION_PROTOCOL_GUID
Value:
{ 0x0DFCE9F6, 0xC4E3, 0x45EE, \
{0xA0, 0x6A, 0xA8, 0x61, 0x3B, 0x98, 0xA5, 0x07 } }

Definition at line 22 of file AppleImageConversion.h.

◆ APPLE_IMAGE_CONVERSION_PROTOCOL_REVISION

#define APPLE_IMAGE_CONVERSION_PROTOCOL_REVISION   0x20000

Definition at line 31 of file AppleImageConversion.h.

Typedef Documentation

◆ APPLE_IMAGE_CONVERSION_PROTOCOL

Apple image conversion protocol definition.

◆ DECODE_IMAGE_DATA

typedef EFI_STATUS(EFIAPI * DECODE_IMAGE_DATA) (IN VOID *ImageBuffer, IN UINTN ImageSize, IN OUT EFI_UGA_PIXEL **RawImageData, IN OUT UINTN *RawImageDataSize)

Decode image data in 32-bit format.

Parameters
[in]ImageBufferBuffer containing image data.
[in]ImageSizeSize of the buffer.
[in,out]RawImageDataPointer to decoded buffer pointer.
  • When NULL it is allocated from pool.
  • When not NULL provided buffer is used.
[in,out]RawImageDataSizeDecoded buffer size.
  • Set to allocated area size if allocated.
  • Set to truncated area size when provided buffer is used.
  • Set to required area size when provided buffer is too small.
Return values
EFI_INVALID_PARAMETERwhen ImageBuffer is NULL.
EFI_INVALID_PARAMETERwhen ImageSize is 0.
EFI_INVALID_PARAMETERwhen RawImageData is NULL.
EFI_INVALID_PARAMETERwhen RawImageDataSize is NULL.
EFI_UNSUPPORTEDwhen image is not supported (e.g. too large or corrupted).
EFI_OUT_OF_RESOURCESwhen allocation error happened.
EFI_BUFFER_TOO_SMALLwhen provided buffer is too small, RawImageDataSize is updated.
EFI_SUCCESSwhen image was decoded successfully.

Definition at line 104 of file AppleImageConversion.h.

◆ DECODE_IMAGE_DATA_EX

typedef EFI_STATUS(EFIAPI * DECODE_IMAGE_DATA_EX) (IN VOID *ImageBuffer, IN UINTN ImageSize, IN UINTN Scale, IN OUT EFI_UGA_PIXEL **RawImageData, IN OUT UINTN *RawImageDataSize)

Decode image data in 32-bit format. Protocol revision APPLE_IMAGE_CONVERSION_PROTOCOL_REVISION or higher is required.

Parameters
[in]ImageBufferBuffer containing image data.
[in]ImageSizeSize of the buffer.
[in]ScaleScaling factor (e.g. 1 or 2).
[in,out]RawImageDataPointer to decoded buffer pointer.
  • When NULL it is allocated from pool.
  • When not NULL provided buffer is used.
[in,out]RawImageDataSizeDecoded buffer size.
  • Set to allocated area size if allocated.
  • Set to truncated area size when provided buffer is used.
  • Set to required area size when provided buffer is too small.
Return values
EFI_INVALID_PARAMETERwhen ImageBuffer is NULL.
EFI_INVALID_PARAMETERwhen ImageSize is 0.
EFI_INVALID_PARAMETERwhen RawImageData is NULL.
EFI_INVALID_PARAMETERwhen RawImageDataSize is NULL.
EFI_UNSUPPORTEDwhen Scale is not supported.
EFI_UNSUPPORTEDwhen image is not supported (e.g. too large or corrupted).
EFI_OUT_OF_RESOURCESwhen allocation error happened.
EFI_BUFFER_TOO_SMALLwhen provided buffer is too small, RawImageDataSize is updated.
EFI_SUCCESSwhen image was decoded successfully.

Definition at line 167 of file AppleImageConversion.h.

◆ GET_IMAGE_DIMS

typedef EFI_STATUS(EFIAPI * GET_IMAGE_DIMS) (IN VOID *ImageBuffer, IN UINTN ImageSize, OUT UINT32 *ImageWidth, OUT UINT32 *ImageHeight)

Get image dimensions.

Parameters
[in]ImageBufferBuffer containing image data.
[in]ImageSizeSize of the buffer.
[out]ImageWidthImage width in pixels.
[out]ImageHeightImage height in pixels.
Return values
EFI_INVALID_PARAMETERwhen ImageBuffer is NULL.
EFI_INVALID_PARAMETERwhen ImageSize is 0.
EFI_INVALID_PARAMETERwhen ImageWidth is NULL.
EFI_INVALID_PARAMETERwhen ImageHeight is NULL.
EFI_UNSUPPORTEDwhen image is not supported (e.g. too large or corrupted).
EFI_SUCCESSwhen image dimensions were read.

Definition at line 73 of file AppleImageConversion.h.

◆ GET_IMAGE_DIMS_EX

typedef EFI_STATUS(EFIAPI * GET_IMAGE_DIMS_EX) (IN VOID *ImageBuffer, IN UINTN ImageSize, IN UINTN Scale, OUT UINT32 *ImageWidth, OUT UINT32 *ImageHeight)

Get image dimensions for scale. Protocol revision APPLE_IMAGE_CONVERSION_PROTOCOL_REVISION or higher is required.

Parameters
[in]ImageBufferBuffer containing image data.
[in]ImageSizeSize of the buffer.
[in]ScaleScaling factor (e.g. 1 or 2).
[out]ImageWidthImage width in pixels.
[out]ImageHeightImage height in pixels.
Return values
EFI_INVALID_PARAMETERwhen ImageBuffer is NULL.
EFI_INVALID_PARAMETERwhen ImageSize is 0.
EFI_INVALID_PARAMETERwhen Scale is 0.
EFI_INVALID_PARAMETERwhen ImageWidth is NULL.
EFI_INVALID_PARAMETERwhen ImageHeight is NULL.
EFI_UNSUPPORTEDwhen Scale is not supported.
EFI_UNSUPPORTEDwhen image is not supported (e.g. too large or corrupted).
EFI_SUCCESSwhen image dimensions were read.

Definition at line 132 of file AppleImageConversion.h.

◆ RECOGNIZE_IMAGE_DATA

typedef EFI_STATUS(EFIAPI * RECOGNIZE_IMAGE_DATA) (IN VOID *ImageBuffer, IN UINTN ImageSize)

Recognise image passed through the buffer.

Parameters
[in]ImageBufferBuffer containing image data.
[in]ImageSizeSize of the buffer.
Return values
EFI_INVALID_PARAMETERwhen ImageBuffer is NULL.
EFI_INVALID_PARAMETERwhen ImageSize is 0.
EFI_UNSUPPORTEDwhen image is not supported (e.g. too large or corrupted).
EFI_SUCCESSwhen image can be decoded.

Definition at line 51 of file AppleImageConversion.h.

Variable Documentation

◆ gAppleImageConversionProtocolGuid

EFI_GUID gAppleImageConversionProtocolGuid
extern