#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).
Public Member Functions | |
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 UniqueHash | GetUniqueHashCode () const |
MAXON_METHOD ColorSpace | GetColorSpace () const |
MAXON_METHOD String | ToString (const FormatStatement *formatStatement=nullptr) const |
MAXON_METHOD void | GetOcioConfig (OcioConfig &config) const |
Static Public Member Functions | |
static MAXON_METHOD Result< ColorProfile > | OpenProfileFromFile (const Url &fn) |
static MAXON_METHOD Result< ColorProfile > | OpenProfileFromMemory (const Block< const Byte > &mem) |
static MAXON_METHOD Result< ColorProfile > | CreateProfile (const OcioConfig &config, const CString &name) |
static MAXON_METHOD Result< ColorProfile > | CreateProfile (const OcioConfig &config, const Url &iccPath) |
static MAXON_METHOD Result< ColorProfile > | CreateProfile (const OcioConfig &config, const CString &viewTransform, const CString &displayColorSpace) |
static MAXON_METHOD Result< ColorProfile > | CreateProfile (const ColorProfile &viewTransform, const ColorProfile &displayColorSpace) |
Private Member Functions | |
MAXON_INTERFACE_NONVIRTUAL (ColorProfileInterface, MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE, "net.maxon.image.interface.colorprofile") | |
|
private |
MAXON_METHOD Bool IsEqual | ( | const ColorProfileInterface * | other | ) | const |
|
static |
|
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. |
|
static |
Private.
|
static |
Private., requires a virtual profile in the config.
|
static |
Private.
|
static |
Private., both profiles must be OCIO.
MAXON_METHOD Result<void> WriteProfileToMemory | ( | WritableArrayInterface< Char > & | mem | ) | const |
Write the current profile to memory.
[out] | mem | Array which receives the memory. |
MAXON_METHOD Result<void> WriteProfileToFile | ( | const Url & | fn | ) | const |
Write the current profile to a file stream.
[in] | fn | Name of the file/stream. |
MAXON_METHOD String GetInfo | ( | COLORPROFILEINFO | info | ) | const |
Returns additional informations to the color profile.
[in] | info | Requested information. See COLORPROFILEINFO. |
MAXON_METHOD UInt32 GetCrc | ( | ) | const |
Returns the crc representing this color profile.
MAXON_METHOD Bool HasProfile | ( | ) | const |
Returns wether the profile instance is based on an ICC profile file or not.
MAXON_METHOD Bool CheckCompatiblePixelFormat | ( | const PixelFormat & | pixelFormat | ) | const |
Check the color profile if it's compatible with the given pixel format. (e.g. if gray scale matches)
MAXON_METHOD Bool IsMonitorProfileMode | ( | ) | const |
Returns whether the color profile is linked to a color profile of a monitor.
MAXON_METHOD HashInt GetHashCode | ( | ) | const |
Returns the hash code of this @CLASS.
MAXON_METHOD UniqueHash GetUniqueHashCode | ( | ) | const |
Returns the 128-bit hash value of this @CLASS. The implementation ensures uniform distribution, so for practical purposes you can safely assume that two objects are equal if their hash values are equal.
MAXON_METHOD ColorSpace GetColorSpace | ( | ) | const |
Returns the color space for which the profile is valid.
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. |
MAXON_METHOD void GetOcioConfig | ( | OcioConfig & | config | ) | const |
Get the OCIO config for this color profile. Returns an empty OcioConfig when this is not an OCIO profile.
[out] | config | The OCIO conig. |