OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
OcPngLib.h File Reference

Go to the source code of this file.

Functions

EFI_STATUS OcGetPngDims (IN VOID *Buffer, IN UINTN Size, OUT UINT32 *Width, OUT UINT32 *Height)
 
EFI_STATUS OcDecodePng (IN VOID *Buffer, IN UINTN Size, OUT VOID **RawData, OUT UINT32 *Width, OUT UINT32 *Height, OUT BOOLEAN *HasAlphaType OPTIONAL)
 
EFI_STATUS OcEncodePng (IN VOID *RawData, IN UINT32 Width, IN UINT32 Height, OUT VOID **Buffer, OUT UINTN *BufferSize)
 

Detailed Description

OcPngLib - library with PNG decoder functions

Copyright (c) 2018, savvas

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 OcPngLib.h.

Function Documentation

◆ OcDecodePng()

EFI_STATUS OcDecodePng ( IN VOID * Buffer,
IN UINTN Size,
OUT VOID ** RawData,
OUT UINT32 * Width,
OUT UINT32 * Height,
OUT BOOLEAN *HasAlphaType OPTIONAL )

Decodes PNG image into raw pixel buffer

Parameters
BufferBuffer with desired png image
SizeSize of input image
RawDataOutput buffer with raw data
WidthImage width at output
HeightImage height at output
HasAlphaTypeReturns 1 if alpha layer present, optional param Set NULL, if not used
Returns
EFI_SUCCESS The function completed successfully.
EFI_OUT_OF_RESOURCES There are not enough resources to init state.
EFI_INVALID_PARAMETER Passed wrong parameter

Definition at line 64 of file OcPng.c.

◆ OcEncodePng()

EFI_STATUS OcEncodePng ( IN VOID * RawData,
IN UINT32 Width,
IN UINT32 Height,
OUT VOID ** Buffer,
OUT UINTN * BufferSize )

Encodes raw pixel buffer into PNG image data

Parameters
RawDataRawData from png image
WidthImage width
HeightImage height
BufferOutput buffer
BufferSizeOutput size
Returns
EFI_SUCCESS The function completed successfully.
EFI_INVALID_PARAMETER Passed wrong parameter

Definition at line 118 of file OcPng.c.

◆ OcGetPngDims()

EFI_STATUS OcGetPngDims ( IN VOID * Buffer,
IN UINTN Size,
OUT UINT32 * Width,
OUT UINT32 * Height )

Retrieves PNG image dimensions

Parameters
BufferBuffer with desired png image
SizeSize of input image
WidthImage width at output
HeightImage height at output
Returns
EFI_SUCCESS The function completed successfully.
EFI_OUT_OF_RESOURCES There are not enough resources to init state.
EFI_INVALID_PARAMETER Passed wrong parameter

Definition at line 25 of file OcPng.c.