ColorProfileConvertInterface Class Reference

#include <gfx_image_colorprofile.h>

Detailed Description

Helper class to convert pixel data from one color profile to another.

Public Member Functions

MAXON_METHOD Result< void > Convert (const ImageConstBuffer &src, const ImageMutableBuffer &dst, Int cnt) const
 
MAXON_METHOD HashInt GetHashCode () const
 
MAXON_METHOD ForwardRef< ColorProfileGpuHandlerRef > GetGpuHandler () const
 

Static Public Member Functions

static MAXON_METHOD Result< ColorProfileConvertInit (const PixelFormat &srcPixelFormat, const ColorProfile &srcProfile, const PixelFormat &dstPixelFormat, const ColorProfile &dstProfile, COLORCONVERSIONINTENT intent, COLORCONVERSIONFLAGS flags)
 
static MAXON_METHOD Result< PixelFormat > GetNearestNativeFormat (const PixelFormat &format)
 
static MAXON_METHOD Result< ColorProfileConvertInitGPU (const ColorProfile &srcProfile, const ColorProfile &dstProfile, COLORCONVERSIONFLAGS_GPU flags, COLORCONVERSION_OPTIMIZATION_GPU_FLAGS optimization)
 

Private Member Functions

 MAXON_INTERFACE_NONVIRTUAL (ColorProfileConvertInterface, MAXON_REFERENCE_CONST, "net.maxon.image.interface.colorprofileconvert")
 

Member Function Documentation

◆ MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( ColorProfileConvertInterface  ,
MAXON_REFERENCE_CONST  ,
"net.maxon.image.interface.colorprofileconvert"   
)
private

◆ Init()

static MAXON_METHOD Result<ColorProfileConvert> Init ( const PixelFormat &  srcPixelFormat,
const ColorProfile srcProfile,
const PixelFormat &  dstPixelFormat,
const ColorProfile dstProfile,
COLORCONVERSIONINTENT  intent,
COLORCONVERSIONFLAGS  flags 
)
static

Create a new helper class to convert from srcPixelFormat to dstPixelFormat.

Parameters
[in]srcPixelFormatSource color pixel format.
[in]srcProfileSource color profile.
[in]dstPixelFormatDestination color profile.
[in]dstProfileDestination color profile.
[in]intentTODO: (Tilo) please describe.
[in]flagsTODO: (Tilo) please describe.
Returns
A object to convert pixel data. If nullptr then there is no need to convert pixels because the profiles are identical.

◆ Convert()

MAXON_METHOD Result<void> Convert ( const ImageConstBuffer src,
const ImageMutableBuffer dst,
Int  cnt 
) const

Call to convert pixel data from one profile to another.

Parameters
[in]srcPointer to the memory block with the source pixel data. The pixel data needs to be in the srcPixelFormat and srcProfile (see Init).
[in]dstPointer to the memory block with the dest pixel data. The pixel data will be written with dstPixelFormat and dstProfile (see Init).
[in]cntNumber of source pixels to convert.

◆ GetHashCode()

MAXON_METHOD HashInt GetHashCode ( ) const

Gets the hash code of the conversion.

Returns
The hash code of the conversion.

◆ GetNearestNativeFormat()

static MAXON_METHOD Result<PixelFormat> GetNearestNativeFormat ( const PixelFormat &  format)
static

Returns the closest compatible pixel format for the given format. If the pixel format is supported natively be the color conversion the given format is returned.

◆ InitGPU()

static MAXON_METHOD Result<ColorProfileConvert> InitGPU ( const ColorProfile srcProfile,
const ColorProfile dstProfile,
COLORCONVERSIONFLAGS_GPU  flags,
COLORCONVERSION_OPTIMIZATION_GPU_FLAGS  optimization 
)
static

Create a new helper class to convert from srcProfile to dstProfile on the GPU.

Parameters
[in]srcProfileSource color profile.
[in]dstProfileDestination color profile.
[in]flagsConversion flags.
[in]optimizationOptimization.
Returns
The GPU converter.

◆ GetGpuHandler()

MAXON_METHOD ForwardRef<ColorProfileGpuHandlerRef> GetGpuHandler ( ) const

Gets the GPU handler for this color conversion.

Returns
GPU handler for this conversion.