In-memory representataion of an ICM profile. More...
#include <mi32/mg2cms.h>
Classes | |
| class | LISTENTRY |
| PROFILE::LISTENTRY used to retrieve a list of PROFILES available on the current system. More... | |
| struct | PRIMARIES |
| Predefined primaries for custom RGB profiles. More... | |
| struct | WHITEPOINT |
| Standard Whitepoints Call EnumerateWhitePoints() to retrieve a list of pre-defined white points. More... | |
Public Types | |
| enum | BUILTIN_PROFILE { PROFILE_NONE = -1, PROFILE_sRGB = 0, PROFILE_XYZ, PROFILE_LAB, PROFILE_AdobeRGB_1998, PROFILE_AppleRGB } |
| enum | CLASS { CLASS_Unspecified = 0, CLASS_Input = 0x73636E72L, CLASS_Display = 0x6D6E7472L, CLASS_Output = 0x70727472L, CLASS_Link = 0x6C696E6BL, CLASS_Abstract = 0x61627374L, CLASS_ColorSpace = 0x73706163L, CLASS_NamedColor = 0x6e6d636cL } |
| enum | ICMCOLORSPACE { ICMCOLORSPACE_XYZ = 0x58595A20L, ICMCOLORSPACE_Lab = 0x4C616220L, ICMCOLORSPACE_Luv = 0x4C757620L, ICMCOLORSPACE_YCbCr = 0x59436272L, ICMCOLORSPACE_Yxy = 0x59787920L, ICMCOLORSPACE_RGB = 0x52474220L, ICMCOLORSPACE_Gray = 0x47524159L, ICMCOLORSPACE_HSV = 0x48535620L, ICMCOLORSPACE_HLS = 0x484C5320L, ICMCOLORSPACE_CMYK = 0x434D594BL, ICMCOLORSPACE_CMY = 0x434D5920L, ICMCOLORSPACE_2Color = 0x32434C52L, ICMCOLORSPACE_3Color = 0x33434C52L, ICMCOLORSPACE_4Color = 0x34434C52L, ICMCOLORSPACE_5Color = 0x35434C52L, ICMCOLORSPACE_6Color = 0x36434C52L, ICMCOLORSPACE_7Color = 0x37434C52L, ICMCOLORSPACE_8Color = 0x38434C52L } |
| enum | INTENT { INTENT_Perceptual = 0, INTENT_RelativeColorimetric = 1, INTENT_Saturation = 2, INTENT_AbsoluteColorimetric = 3 } |
| enum | TAG { TAG_AToB0 = 0x41324230L, TAG_AToB1 = 0x41324231L, TAG_AToB2 = 0x41324232L, TAG_BlueColorant = 0x6258595AL, TAG_BlueTRC = 0x62545243L, TAG_BToA0 = 0x42324130L, TAG_BToA1 = 0x42324131L, TAG_BToA2 = 0x42324132L, TAG_CalibrationDateTime = 0x63616C74L, TAG_CharTarget = 0x74617267L, TAG_Copyright = 0x63707274L, TAG_CrdInfo = 0x63726469L, TAG_DeviceMfgDesc = 0x646D6E64L, TAG_DeviceModelDesc = 0x646D6464L, TAG_Gamut = 0x67616D74L, TAG_GrayTRC = 0x6b545243L, TAG_GreenColorant = 0x6758595AL, TAG_GreenTRC = 0x67545243L, TAG_Luminance = 0x6C756d69L, TAG_Measurement = 0x6D656173L, TAG_MediaBlackPoint = 0x626B7074L, TAG_MediaWhitePoint = 0x77747074L, TAG_NamedColor = 0x6E636f6CL, TAG_NamedColor2 = 0x6E636C32L, TAG_Preview0 = 0x70726530L, TAG_Preview1 = 0x70726531L, TAG_Preview2 = 0x70726532L, TAG_ProfileDescription = 0x64657363L, TAG_ProfileSequenceDesc = 0x70736571L, TAG_Ps2CRD0 = 0x70736430L, TAG_Ps2CRD1 = 0x70736431L, TAG_Ps2CRD2 = 0x70736432L, TAG_Ps2CRD3 = 0x70736433L, TAG_Ps2CSA = 0x70733273L, TAG_RenderingIntent = 0x70733269L, TAG_RedColorant = 0x7258595AL, TAG_RedTRC = 0x72545243L, TAG_ScreeningDesc = 0x73637264L, TAG_Screening = 0x7363726EL, TAG_Technology = 0x74656368L, TAG_UcrBg = 0x62666420L, TAG_ViewingCondDesc = 0x76756564L, TAG_ViewingConditions = 0x76696577L } |
| enum | USAGE { USAGE_Input = 0, USAGE_Output = 1, USAGE_Proof = 2 } |
Public Member Functions | |
| PROFILE (const PROFILE &rhs) | |
| PROFILE (BUILTIN_PROFILE builtin) | |
| PROFILE () | |
| ~PROFILE () | |
| ERRVALUE | Create (const PROFILEPARMS_PRINTER &parms) |
| ERRVALUE | Create (const PROFILEPARMS_RGB &parms) |
| ERRVALUE | CreateBuiltInProfile (BUILTIN_PROFILE profile) |
| ERRVALUE | CreateDeviceLinkProfile (TRANSFORM &transform, UINT32 flags) |
| ERRVALUE | CreateGrayProfile (const COLORxyY &WhitePoint, const GAMMA &TransferFunction) |
| ERRVALUE | CreateInkLimitingProfile (double limit, COLORSPACE ColorSpace) |
| ERRVALUE | CreateRGBProfile (const COLORxyY &WhitePoint, const PRIMARIES &Primaries, const GAMMA &TransferFunctionRed, const GAMMA &TransferFunctionGreen, const GAMMA &TransferFunctionBlue) |
| void | Free () |
| bool | GetColorants (COLORXYZ &red, COLORXYZ &green, COLORXYZ &blue) const |
| ICMCOLORSPACE | GetColorSpace () const |
| void | GetDesc (MISTRING &) const |
| CLASS | GetDeviceClass () const |
| bool | GetIluminant (COLORXYZ &illuminant) const |
| bool | GetMediaBlackPoint (COLORXYZ &blackpoint) const |
| bool | GetMediaWhitePoint (COLORXYZ &whitepoint) const |
| void | GetName (MISTRING &) const |
| ICMCOLORSPACE | GetPCS () const |
| INTENT | GetRenderingIntent () const |
| bool | HasTag (TAG sig) const |
| bool | IsEmpty () const |
| bool | operator!= (const PROFILE &rhs) const |
| PROFILE & | operator= (const PROFILE &rhs) |
| bool | operator== (const PROFILE &rhs) const |
| ERRVALUE | Read (const FILEPATH &path) |
| ERRVALUE | ReadFromMemory (const void *buf, int size) |
| bool | SupportsIntent (INTENT intent, USAGE use) const |
Static Public Member Functions | |
| static ERRVALUE | EnumeratePrimaries (MILIST< PRIMARIES > &List) |
| static ERRVALUE | EnumerateProfiles (CLASS ProfileClass, MILIST< LISTENTRY > &List) |
| static ERRVALUE | EnumerateWhitePoints (MILIST< WHITEPOINT > &List) |
| static bool | WhitePointFromTemp (int tempK, COLORxyY &WhitePoint) |
In-memory representataion of an ICM profile.
| enum MGD::PROFILE::CLASS |
| enum MGD::PROFILE::INTENT |
| enum MGD::PROFILE::TAG |
ICM Profile tags.
These are only used to see if a profile has a given tag, and eventually to retrieve data for specific tags
| enum MGD::PROFILE::USAGE |
Profile usage. Used as a parameter to SupportsIntent().
| MGD::PROFILE::PROFILE | ( | ) | [inline] |
Default constructor Empty profile until Open or something els/PRIM is called.
| MGD::PROFILE::PROFILE | ( | BUILTIN_PROFILE | builtin | ) | [inline] |
Construct a built-in profile
| MGD::PROFILE::PROFILE | ( | const PROFILE & | rhs | ) |
Copy constructor Copy is "cheap" as the actual data is refcounted.
| MGD::PROFILE::~PROFILE | ( | ) |
Destructor (note: not virtual.
No derived classes)
| ERRVALUE MGD::PROFILE::Create | ( | const PROFILEPARMS_PRINTER & | parms | ) |
| ERRVALUE MGD::PROFILE::Create | ( | const PROFILEPARMS_RGB & | parms | ) |
| ERRVALUE MGD::PROFILE::CreateBuiltInProfile | ( | BUILTIN_PROFILE | profile | ) |
Create an sRGB or LAB profile, which can be hard-coded.
Create a profile which combines all the profiles in a transform into a single profile.
| flags | XXX Define enum for whatever flags it wants |
| ERRVALUE MGD::PROFILE::CreateGrayProfile | ( | const COLORxyY & | WhitePoint, | |
| const GAMMA & | TransferFunction | |||
| ) |
| ERRVALUE MGD::PROFILE::CreateInkLimitingProfile | ( | double | limit, | |
| COLORSPACE | ColorSpace | |||
| ) |
cmsTransfor2DeviceLink(transform, dwFlags) flags: cmsFLAGS_HIGHRESPRECALC cmsFLAGS_LOWRESPRECALD
Create an ink-limiting device link profile.
| limit | Ink limit (0 to 400%) | |
| ColorSpace | XXX default to CMYK |
| ERRVALUE MGD::PROFILE::CreateRGBProfile | ( | const COLORxyY & | WhitePoint, | |
| const PRIMARIES & | Primaries, | |||
| const GAMMA & | TransferFunctionRed, | |||
| const GAMMA & | TransferFunctionGreen, | |||
| const GAMMA & | TransferFunctionBlue | |||
| ) |
Create an RGB profile from a whitepoint, 3 primaries and 3 gamma tables.
Some common primaries can be found using the function EnumeratePrimaries()
Return a list of RGB primaries for custom RGB spaces.
The order of entries in this list may change. Do not depend on position within the list. The COLORxyY values may change if more accurate values are found. The names and numeric IDs will not change for a given entry and may be safely written to a file to record which entry was selected. The numeric ID is also useful for populating ComboBoxes
| static ERRVALUE MGD::PROFILE::EnumerateProfiles | ( | CLASS | ProfileClass, | |
| MILIST< LISTENTRY > & | List | |||
| ) | [static] |
Return a list of profiles for a given device class.
| static ERRVALUE MGD::PROFILE::EnumerateWhitePoints | ( | MILIST< WHITEPOINT > & | List | ) | [static] |
Return the list of standard White points.
The order of entries in this list may change. Do not depend on position within the list. The COLORxyY values may change if more accurate values are found. The names and numeric IDs will not change for a given entry and may be safely written to a file to record which entry was selected.
For WhitePoints which are temperatures in degrees Kelvin, the numeric ID is actually the temperature. For the others, (Illuminant A, etc), they're just arbitrary numbers.
| void MGD::PROFILE::Free | ( | ) |
Get the CIEXYZ values of R,G,and B.
| ICMCOLORSPACE MGD::PROFILE::GetColorSpace | ( | ) | const |
| void MGD::PROFILE::GetDesc | ( | MISTRING & | ) | const |
Return the description of the profile.
| CLASS MGD::PROFILE::GetDeviceClass | ( | ) | const |
cmsGetColorSpace
Return the device class (input, output, whatever)
| bool MGD::PROFILE::GetIluminant | ( | COLORXYZ & | illuminant | ) | const |
Get the Iluminant.
| bool MGD::PROFILE::GetMediaBlackPoint | ( | COLORXYZ & | blackpoint | ) | const |
Get the media Black Point.
| bool MGD::PROFILE::GetMediaWhitePoint | ( | COLORXYZ & | whitepoint | ) | const |
Get the media White Point.
| void MGD::PROFILE::GetName | ( | MISTRING & | ) | const |
Return the name of the profile.
| ICMCOLORSPACE MGD::PROFILE::GetPCS | ( | ) | const |
Get the PCS color space XXX (What is the PCS color space and how is it different from cmsGetColorSpace()?
| INTENT MGD::PROFILE::GetRenderingIntent | ( | ) | const |
Return the default rendering intent.
| bool MGD::PROFILE::HasTag | ( | TAG | sig | ) | const |
Return true if the profile contains the specified ICM tag.
| bool MGD::PROFILE::IsEmpty | ( | ) | const [inline] |
| bool MGD::PROFILE::operator!= | ( | const PROFILE & | rhs | ) | const [inline] |
Assignment operator.
Assignment is "cheap" as the actual data is refcounted
| bool MGD::PROFILE::operator== | ( | const PROFILE & | rhs | ) | const |
Comparison operator.
| ERRVALUE MGD::PROFILE::ReadFromMemory | ( | const void * | buf, | |
| int | size | |||
| ) |
Actual implementation will call cmsOpenProfileFromFile(filaname, "r");.
| buf | XXX Actual cmsOpenProfileFromMem takes non-const but makes a copy |
returns true if the profile supports the given intent.
| static bool MGD::PROFILE::WhitePointFromTemp | ( | int | tempK, | |
| COLORxyY & | WhitePoint | |||
| ) | [static] |
Convert a tempature to a CIExyY color.
Returns true if the whitepoint could be computed, or false if the tempeture is not valid.
| tempK | Temperature in degrees Kelvin | |
| WhitePoint | Color returned |
1.6.1