Pixel format conversion class. More...

#include "murl_util_pixel_converter.h"

Public Types

using Method = void(*)(UInt8 *dstPtr, const UInt8 *srcPtr, UInt32 numberOfPixels)
 Definition of the converter function pointer. More...
 

Static Public Member Functions

static Bool ColorToPixel (UInt8Array &pixel, IEnums::PixelFormat format, const Color &color)
 Convert a color to a given pixelformat. More...
 
static Method GetConverter (IEnums::PixelFormat destFormat, IEnums::PixelFormat srcFormat)
 Get the converter function pointer for specified pixel formats. More...
 
static Method GetCopy (IEnums::PixelFormat pixelFormat)
 Get the converter function pointer for a specified pixel format to copy. More...
 

Detailed Description

Pixel format conversion class.

Member Typedef Documentation

◆ Method

using Murl::Util::PixelConverter::Method = void(*)(UInt8* dstPtr, const UInt8* srcPtr, UInt32 numberOfPixels)

Definition of the converter function pointer.

Use IEnums::GetPixelFormatByteSize() to calculate the size of the source and destination memory.

Parameters
dstPtrPointer to the destination memory.
srcPtrPointer to the source memory.
numberOfPixelsThe number of pixels to convert.

Member Function Documentation

◆ ColorToPixel()

static Bool Murl::Util::PixelConverter::ColorToPixel ( UInt8Array pixel,
IEnums::PixelFormat  format,
const Color color 
)
static

Convert a color to a given pixelformat.

Parameters
pixelThe destination pixel data.
formatThe pixel format to convert to.
colorThe color to convert.
Returns
true if successful.

◆ GetConverter()

static Method Murl::Util::PixelConverter::GetConverter ( IEnums::PixelFormat  destFormat,
IEnums::PixelFormat  srcFormat 
)
static

Get the converter function pointer for specified pixel formats.

Parameters
destFormatThe destination pixel format.
srcFormatThe source pixel format.
Returns
The converter function pointer or null if the conversion is not available.

◆ GetCopy()

static Method Murl::Util::PixelConverter::GetCopy ( IEnums::PixelFormat  pixelFormat)
static

Get the converter function pointer for a specified pixel format to copy.

Parameters
pixelFormatThe pixel format.
Returns
The converter function pointer or null if the conversion is not available.

The documentation for this class was generated from the following file:
  • murl_util_pixel_converter.h


Copyright © 2011-2024 Spraylight GmbH.