PixelFormatsInterface Class Reference

#include <gfx_image_pixelformat.h>

Detailed Description

PixelFormatsInterface is a static interface which provides general functions for pixel format management.

Public Member Functions

template<typename PIXELTYPE >
Result< PixelFormat > FindOrCreatePixelFormat (const Block< const ImageChannelType > &imageChannelTypes)
 
template<typename PIXELTYPE , typename... CHANNELS>
Result< PixelFormat > FindOrCreatePixelFormat ()
 

Static Public Member Functions

static MAXON_METHOD Result< PixelFormat > FindOrCreatePixelFormat (const Block< const ImageChannel > &channels)
 
template<typename PIXELTYPE , typename... CHANNELS>
static MAXON_FUNCTION Result< PixelFormat > FindOrCreatePixelFormat ()
 
template<typename PIXELTYPE >
static MAXON_FUNCTION Result< PixelFormat > FindOrCreatePixelFormat (const Block< const ImageChannelType > &imageChannelTypes)
 
static MAXON_FUNCTION Result< PixelFormat > FindOrCreatePixelFormat (const DataType &pixelType, const Block< const ImageChannelType > &imageChannelTypes)
 

Private Member Functions

 MAXON_INTERFACE_NONVIRTUAL (PixelFormatsInterface, MAXON_REFERENCE_NONE, "net.maxon.image.interface.pixelformats")
 

Member Function Documentation

◆ MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( PixelFormatsInterface  ,
MAXON_REFERENCE_NONE  ,
"net.maxon.image.interface.pixelformats"   
)
private

◆ FindOrCreatePixelFormat() [1/3]

static MAXON_METHOD Result<PixelFormat> FindOrCreatePixelFormat ( const Block< const ImageChannel > &  channels)
static

Create of find a pixel format.

Parameters
[in]channelsBlock with image channels to look for or to create.
Returns
Pixel format on success.

◆ FindOrCreatePixelFormat() [2/3]

static MAXON_FUNCTION Result<PixelFormat> FindOrCreatePixelFormat ( )
static

Create of find a pixel format. This function simplifies the usage without the need to create the block of channels on the stack:

PixelFormat formatGBR32f = PixelFormatsInterface::FindOrCreatePixelFormat<ImageChannels::Green, ImageChannels::Blue, ImageChannels::Red>() iferr_return;
#define iferr_return
Definition: resultbase.h:1519
Returns
Pixel format on success.

◆ FindOrCreatePixelFormat() [3/3]

static MAXON_FUNCTION Result<PixelFormat> FindOrCreatePixelFormat ( const Block< const ImageChannelType > &  imageChannelTypes)
static

Create of find a pixel format. This function simplifies the usage without the need to create the array of channels on the stack:

Parameters
[in]imageChannelTypesImage Channel types.
PixelFormat formatGBR32f = PixelFormatsInterface::FindOrCreatePixelFormat<ImageChannels::Green, ImageChannels::Blue, ImageChannels::Red>() iferr_return;
Returns
Pixel format on success.