ColorProfileInterface Class Reference

#include <gfx_image_colorprofile.h>

详细描述

This class allows to deal with color profiles. Color profiles are used to map colors from a given color space (e.g. image color space) into a destination color space (e.g. calibrated monitor).

公共成员函数

MAXON_METHOD Bool   IsEqual (const ColorProfileInterface *other) const
MAXON_METHOD Result < void >  WriteProfileToMemory ( WritableArrayInterface < Char > &mem) const
MAXON_METHOD Result < void >  WriteProfileToFile (const Url &fn) const
MAXON_METHOD String   GetInfo ( COLORPROFILEINFO info) const
MAXON_METHOD UInt32   GetCrc () const
MAXON_METHOD Bool   HasProfile () const
MAXON_METHOD Bool   CheckCompatiblePixelFormat (const PixelFormat &pixelFormat) const
MAXON_METHOD Bool   IsMonitorProfileMode () const
MAXON_METHOD HashInt   GetHashCode () const
MAXON_METHOD ColorSpace  GetColorSpace () const
MAXON_METHOD String   ToString (const FormatStatement *formatStatement=nullptr) const

静态公共成员函数

static MAXON_METHOD Result < ColorProfile OpenProfileFromFile (const Url &fn)
static MAXON_METHOD Result < ColorProfile OpenProfileFromMemory (const Block < const Byte > &mem)

私有成员函数

  MAXON_INTERFACE_NONVIRTUAL ( ColorProfileInterface , MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE , "net.maxon.image.interface.colorprofile")

成员函数文档编制

◆  MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( ColorProfileInterface   ,
MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE   ,
"net.maxon.image.interface.colorprofile"   
)
private

◆  IsEqual()

MAXON_METHOD Bool IsEqual ( const ColorProfileInterface other ) const

◆  OpenProfileFromFile()

static MAXON_METHOD Result < ColorProfile > OpenProfileFromFile ( const Url fn )
static

Create a color profile from a Url .

参数
[in] fn Url of the preset. This could be an icc file from the hard drive.
返回
A valid color profile if the operation was successful.

◆  OpenProfileFromMemory()

static MAXON_METHOD Result < ColorProfile > OpenProfileFromMemory ( const Block < const Byte > &  mem )
static

Create a color profile from a memory block. This can be used to read the color profiles within images.

参数
[in] mem Memory block representing the icc color profile.
返回
A valid color profile if the operation was successful.

◆  WriteProfileToMemory()

MAXON_METHOD Result <void> WriteProfileToMemory ( WritableArrayInterface < Char > &  mem ) const

Write the current profile to memory.

参数
[out] mem Array which receives the memory.
返回
True if the function operates successful.

◆  WriteProfileToFile()

MAXON_METHOD Result <void> WriteProfileToFile ( const Url fn ) const

Write the current profile to a file stream.

参数
[in] fn Name of the file/stream.
返回
True if the function operates successful.

◆  GetInfo()

MAXON_METHOD String GetInfo ( COLORPROFILEINFO   info ) const

Returns additional informations to the color profile.

参数
[in] info Requested information. See COLORPROFILEINFO.
返回
String with the information stored in the color profile.

◆  GetCrc()

MAXON_METHOD UInt32 GetCrc ( ) const

Returns the crc representing this color profile.

◆  HasProfile()

MAXON_METHOD Bool HasProfile ( ) const

Returns whether this object contains a valid color profile.

◆  CheckCompatiblePixelFormat()

MAXON_METHOD Bool CheckCompatiblePixelFormat ( const PixelFormat &  pixelFormat ) const

Check the color profile if it's compatible with the given pixel format. 8e.g. if gray scale matches)

返回
True if the pixel format is compatible with the color profile.

◆  IsMonitorProfileMode()

MAXON_METHOD Bool IsMonitorProfileMode ( ) const

Returns whether the color profile is linked to a color profile of a monitor.

◆  GetHashCode()

MAXON_METHOD HashInt GetHashCode ( ) const

Returns the hash code of the object.

◆  GetColorSpace()

MAXON_METHOD ColorSpace GetColorSpace ( ) const

Returns the color space for which the profile is valid.

◆  ToString()

MAXON_METHOD String ToString ( const FormatStatement formatStatement = nullptr ) const

Returns a readable string of the content.

参数
[in] formatStatement Nullptr or additional formatting instruction. Currently no additional formatting instructions are supported.
返回
The converted result. By default, this is the name of the class, followed by @, followed by the hexadecimal memory address of this object.