Public interface to the EDL color manager. There is only one instance of the color manager for each factory. It can be retrieved using the IEDLFactory::getSingleton method, or by using the get() static function. More...
#include <icolormanager.h>
Public Member Functions | |
virtual void | convertColors (int32 numColors, bool hasAlpha, const IDOMColorSpacePtr &sourceSpace, const IDOMColorSpacePtr &destSpace, eRenderingIntent intent, eBlackPointCompensation bpc, const float *inColors, float *outColors)=0 |
Convert colors from one color space to another, using floating point samples. | |
virtual void | convertColors (int32 numColors, bool hasAlpha, const IDOMColorSpacePtr &sourceSpace, const IDOMColorSpacePtr &destSpace, eRenderingIntent intent, eBlackPointCompensation bpc, const uint8 *inColors, uint8 *outColors, int32 inBPS, int32 outBPS)=0 |
Convert colors from one color space to another, using integer samples. Currently, only base color spaces are supported; Indexed and DeviceN spaces cannot be used. For conversion of multiple samples, samples are interleaved, with any alpha being last. For example, sRGB with alpha must be presented as r, g, b, a, r, g, b, a, etc. | |
virtual uint8 | getNumComponentsForICCBasedSpace (const IDOMColorSpaceICCBasedPtr &space)=0 |
Find the number of components for an ICCBased color space. | |
virtual uint8 | getNumComponentsForICCProfile (const IDOMICCProfilePtr &profile)=0 |
Find the number of components for an ICC profile. | |
virtual eRenderingIntent | getDefaultIntentForICCBasedSpace (const IDOMColorSpaceICCBasedPtr &space)=0 |
Find the default rendering intent for an ICCBased color space. | |
virtual uint32 | getProfileColorSpaceForICCBasedSpace (const IDOMColorSpaceICCBasedPtr &space)=0 |
Get the color space type for an ICCBased color space. | |
virtual void | getProfileVersionForICCBasedSpace (const IDOMColorSpaceICCBasedPtr &space, uint8 &majorVersion, uint8 &minorVersion)=0 |
Get the version number of the profile used for the given ICC color space. | |
virtual uint32 | getProfileClassForICCBasedSpace (const IDOMColorSpaceICCBasedPtr &space)=0 |
Get the profile class of the profile used for the given ICC color space. | |
virtual uint32 | getProfileConnectionSpaceForICCBasedSpace (const IDOMColorSpaceICCBasedPtr &space)=0 |
Get the profile connection space (PCS) type for the profile used for the given ICC color space. | |
virtual bool | getProfileHasSupportForIntentForICCBasedSpace (const IDOMColorSpaceICCBasedPtr &space, eRenderingIntent intent, bool input)=0 |
Determine if the profile used for the given ICC color space has support for the given intent for the given usage. Matrix shaper style profiles support every intent. LUT-based profiles may have explicit support for some intents. | |
virtual void | getProfileNameForICCBasedSpace (const IDOMColorSpaceICCBasedPtr &space, EDLSysString &name)=0 |
Get the name of the profile for an ICCBased color space. | |
virtual CEDLSysStringVect | getColorantNamesForICCBasedSpace (const IDOMColorSpaceICCBasedPtr &space)=0 |
Retrieve the colorant names of an ICC based color space. For simple Gray, RGB or CMYK ICC profiles, the standard process names will be returned. For multichannel profiles, the 'clrt' components will be queried. An IEDLError exception with error code EDL_ERR_NO_COLOR_NAME will be thrown if no name could be determined. | |
virtual IDOMICCProfilePtr | getCMYKSWOPProfile ()=0 |
Retrieve the built-in CMYK SWOP profile. | |
virtual IDOMICCProfilePtr | getsGrayProfile ()=0 |
Retrieve the built-in sGray profile. | |
virtual IDOMICCProfilePtr | getsRGBProfile ()=0 |
Retrieve the built-in sRGB profile. | |
virtual IDOMICCProfilePtr | getscRGBProfile ()=0 |
Retrieve the built in scRGB profile. | |
virtual IDOMICCProfilePtr | createCalibratedGrayProfile (const CEDLVector< double > &whitePoint, double gamma=1.0, const CEDLVector< double > &blackPoint=CEDLVector< double >())=0 |
Create a profile for a calibrated gray color space with the given parameters. Such a profile will be analogous to the PDF CalGray color space. | |
virtual IDOMICCProfilePtr | createGrayProfile (const CEDLVector< double > &whitePoint, CEDLVector< float > &gamma, const CEDLVector< double > &blackPoint=CEDLVector< double >())=0 |
Create a profile for a gray color space with the given parameters, including the ability to specify an arbitrary gamma function. | |
virtual IDOMICCProfilePtr | createCalibratedRGBProfile (const CEDLVector< double > &whitePoint, const CEDLVector< double > &gamma=CEDLVector< double >(), const CEDLVector< double > &matrix=CEDLVector< double >(), const CEDLVector< double > &blackPoint=CEDLVector< double >())=0 |
Create a profile for a calibrated RGB color space with the given parameters. Such a profile will be analogous to the PDF CalRGB color space. | |
virtual IDOMICCProfilePtr | createXyzProfile (const CEDLVector< double > &whitePoint, const CEDLVector< double > &blackPoint=CEDLVector< double >())=0 |
Create an XYZ profile with the given parameters. | |
virtual void | setMapDeviceGrayToCMYKBlack (bool mapGrayDirectly)=0 |
Configure how DeviceGray colors are converted to DeviceCMYK. | |
virtual bool | getMapDeviceGrayToCMYKBlack () const =0 |
Setting that determines how the color manager will convert DeviceGray colors to DeviceCMYK. | |
virtual void | setDefaultBlackPointCompensation (eBlackPointCompensation defaultBpc)=0 |
Set the default behaviour for black point compensation when (and only when) eBPCDefault is used by convertColors() routines. | |
virtual eBlackPointCompensation | getDefaultBlackPointCompensation () const =0 |
Obtain the current black point compensation default setting. | |
virtual void | setDefaultBlackPreservation (bool preserveForText, bool preserveForOther)=0 |
Set the default for black point preservation across the Jaws Mako instance. | |
virtual bool | getDefaultTextBlackPreservation () const =0 |
Query the default black point preservation for text objects. | |
virtual bool | getDefaultOtherBlackPreservation () const =0 |
Query the default black point preservation for non-text objects. | |
virtual void | setDeviceGrayIntercept (const IDOMColorSpacePtr &space)=0 |
Set the intercept color space for DeviceGray. This is the color space that will be used for conversion if the color manager is asked to convert from or to DeviceGray. | |
virtual IDOMColorSpacePtr | getDeviceGrayIntercept ()=0 |
Get the intercept color space for DeviceGray. This is the color space that will be used for conversion if the color manager is asked to convert from or to DeviceGray. The default DeviceGray intercept is sGray. | |
virtual void | setDeviceRGBIntercept (const IDOMColorSpacePtr &space)=0 |
Set the intercept color space for DeviceRGB. This is the color space that will be used for conversion if the color manager is asked to convert from or to DeviceRGB. | |
virtual IDOMColorSpacePtr | getDeviceRGBIntercept ()=0 |
Get the intercept color space for DeviceRGB. This is the color space that will be used for conversion if the color manager is asked to convert from or to DeviceRGB. The default DeviceRGB intercept is sRGB. | |
virtual void | setDeviceCMYKIntercept (const IDOMColorSpacePtr &space)=0 |
Set the intercept color space for DeviceCMYK. This is the color space that will be used for conversion if the color manager is asked to convert from or to DeviceCMYK. | |
virtual IDOMColorSpacePtr | getDeviceCMYKIntercept ()=0 |
Get the intercept color space for DeviceCMYK. This is the color space that will be used for conversion if the color manager is asked to convert from or to DeviceCMYK. The default DeviceCMYK intercept is a CMYK SWOP ICCBased color space. | |
virtual IDOMColorSpacePtr | interceptSpace (const IDOMColorSpacePtr &space)=0 |
Gets the intercept associated with the given space if any, or return the original space if not. It is safe to pass any color space to this member. | |
virtual IDOMICCProfilePtr | getProfileForSpace (const IDOMColorSpacePtr &space)=0 |
Get a profile for the given space, if possible. For ICCBased color spaces, this simply returns the profile. | |
virtual void | getPostScriptCSAForICCBasedSpace (CEDLSimpleBuffer &csaMemory, const IDOMColorSpaceICCBasedPtr &space, eRenderingIntent intent)=0 |
Get an equivalent PostScript CSA for an ICC based color space. This will be a CIEBased color space in the form of PostScript code. | |
virtual bool | getEmbeddedPSCSAForICCBasedSpace (CEDLSimpleBuffer &csaMemory, const IDOMColorSpaceICCBasedPtr &space)=0 |
Get any PostScript CSA present in an ICC Based color space. These are found under the 'ps2s' tag in an ICC profile, and are optional. | |
virtual void | useDeviceLinkForConversionsBetween (const IDOMColorSpaceICCBasedPtr &sourceSpace, const IDOMColorSpaceICCBasedPtr &destSpace, const IDOMICCProfilePtr &deviceLink)=0 |
Set the DeviceLink ICC profile with specifying a combination of the source color space and the destination color space. If the same combination of sourceSpace and destSpace was specified with different DeviceLink ICC profile, the old DeviceLink ICC profile is replaced with the new DeviceLink ICC profile. | |
virtual void | useDeviceLinkForConversionsBetween (const IDOMICCProfilePtr &sourceProfile, const IDOMICCProfilePtr &destProfile, const IDOMICCProfilePtr &deviceLink)=0 |
Convenience version of useDeviceLinkForConversionsBetween() that accepts IDOMICCProfiles instead of IDOMColorSpaceICCBased. | |
virtual uint32 | getNumDeviceLinkICCProfiles ()=0 |
Get the number of DeviceLink ICC profiles which have been set. | |
virtual void | getDeviceLinkICCProfile (const uint8 index, IDOMColorSpaceICCBasedPtr &sourceSpace, IDOMColorSpaceICCBasedPtr &destSpace, IDOMICCProfilePtr &deviceLink)=0 |
Get the DeviceLink ICC profile and the associated color spaces. | |
virtual void | deleteDeviceLinkForConversionsBetween (const IDOMColorSpaceICCBasedPtr &sourceSpace, const IDOMColorSpaceICCBasedPtr &destSpace)=0 |
Delete the DeviceLink ICC profile associated with the specified combination of the source color space and the destination color space. | |
virtual void | deleteDeviceLinkForConversionsBetween (const IDOMICCProfilePtr &sourceProfile, const IDOMICCProfilePtr &destProfile)=0 |
Convenience version of deleteDeviceLinkForConversionsBetween() that accepts IDOMICCProfiles instead of IDOMColorSpaceICCBased. | |
virtual bool | testGamut (uint32 numColors, const IDOMColorSpacePtr &sourceSpace, const IDOMColorSpacePtr &destSpace, eRenderingIntent intent, eBlackPointCompensation bpc, const float *inColors)=0 |
Tests whether the result of gamut checking is within the gamut of the destination color space. | |
Public Member Functions inherited from IEDLObject | |
virtual const CClassID & | getClassID () const =0 |
Returns class ID of IEDLObject. | |
virtual bool | init (CClassParams *pData) |
The init() method is called to perform any post-construction initialization of an IEDLObject that has been created by the EDL class factory, before it is actually returned by the factory. | |
virtual bool | clone (IEDLObjectPtr &ptrObject, IEDLClassFactory *pFactory) |
Create a copy of EDLObject. | |
Public Member Functions inherited from IRCObject | |
virtual void | addRef () const =0 |
Increases the reference count of the actual object pointed to. This would take place during an assignment or copying. | |
virtual bool | decRef () const =0 |
Decreases the reference count of the actual object pointed to. When the reference count falls to Zero, it deletes the actual object pointed to. | |
virtual int32 | getRefCount () const =0 |
Retrieve the current reference count of the actual object pointed to. | |
Static Public Member Functions | |
static EDL_API IColorManagerPtr | get (IEDLClassFactory *pFactory) |
Get the color manager singleton. Throws an IEDLError on failure. | |
Additional Inherited Members | |
Protected Member Functions inherited from IRCObject | |
virtual | ~IRCObject () |
Virtual destructor. | |
Public interface to the EDL color manager. There is only one instance of the color manager for each factory. It can be retrieved using the IEDLFactory::getSingleton method, or by using the get() static function.
Exceptions of type IEDLError are thrown on errors.
|
pure virtual |
Convert colors from one color space to another, using floating point samples.
Currently, only base color spaces are supported; Indexed and DeviceN spaces cannot be used. For conversion of multiple samples, samples are interleaved, with any alpha being last. For example, sRGB with alpha must be presented as r, g, b, a, r, g, b, a, etc.
Device Link profiles are supported. To use a Device Link profile, pass an IDOMColorSpaceICCBased colorspace containing that profile as the sourceSpace, and pass a NULL as the destSpace.
numColors | The number of colors to convert. |
hasAlpha | Set to true if the color data contains alpha. |
sourceSpace | The color space describing the input samples. |
destSpace | The desired color space for the output samples. May be NULL if destSpace is a Device Link profile. |
intent | The desired rendering intent for the conversion. |
bpc | The desired handling of black point compensation. If in doubt, use eBPCDefault. |
inColors | Pointer to the input sample buffer. |
outColors | Pointer to the output sample buffer. |
|
pure virtual |
Convert colors from one color space to another, using integer samples. Currently, only base color spaces are supported; Indexed and DeviceN spaces cannot be used. For conversion of multiple samples, samples are interleaved, with any alpha being last. For example, sRGB with alpha must be presented as r, g, b, a, r, g, b, a, etc.
Device Link profiles are supported. To use a Device Link profile, pass an IDOMColorSpaceICCBased colorspace containing that profile as the sourceSpace, and pass a NULL as the destSpace.
numColors | The number of colors to convert. |
hasAlpha | Set to true if the color data contains alpha. |
sourceSpace | The color space describing the input samples. |
destSpace | The desired color space for the output samples. May be NULL if destSpace is a Device Link profile. |
intent | The desired rendering intent for the conversion. |
bpc | The desired handling of black point compensation. If in doubt, use eBPCDefault. |
inColors | Pointer to the input sample buffer. |
outColors | Pointer to the output sample buffer. |
inBPS | The bits per sample of the input samples. Currently 1, 2, 4, 8, 12 and 16 bits are supported. |
outBPS | The desired bits per sample of the output samples. Currently 1, 2, 4, 8, 12 and 16 bits are supported. |
|
pure virtual |
Create a profile for a calibrated gray color space with the given parameters. Such a profile will be analogous to the PDF CalGray color space.
whitePoint | A three entry vector describing the white point of the color space, in the CIE XYZ color space. |
gamma | Optional. The gamma for the color space, 1.0 if not provided |
blackPoint | Optional. A three entry vector describing the black point of the color space, in the CIE XYZ color space. If not supplied, the values 0,0,0 will be used. |
|
pure virtual |
Create a profile for a calibrated RGB color space with the given parameters. Such a profile will be analogous to the PDF CalRGB color space.
whitePoint | A three entry vector describing the white point of the color space, in the CIE XYZ color space. |
gamma | Optional. A vector containing the desired gamma for the color space, one value for R, G and B restpectively. 1 1 1 is used if not provided. |
matrix | Optional. A nine entry vector representing a the linear transformation of the gamma corrected RGB values into CIE XYZ space. If not provided, then an identit matrix (1, 0, 0, 0, 1, 0, 0, 0, 1) will be used. |
blackPoint | Optional. A three entry vector describing the black point of the color space, in the CIE XYZ color space. If not supplied, the values 0,0,0 will be used. |
|
pure virtual |
Create a profile for a gray color space with the given parameters, including the ability to specify an arbitrary gamma function.
whitePoint | A three entry vector describing the white point of the color space, in the CIE XYZ color space. |
gamma | A gamma function consisting of a table of evenly- spaced, output values. For example, a 10 entry vector would describe the output of the gamma function for 0.1 increments between 0.0 and 1.0 inclusive. There must be at least two entries (which would describe a linear gamma function). |
blackPoint | Optional. A three entry vector describing the black point of the color space, in the CIE XYZ color space. If not supplied, the values 0,0,0 will be used. |
|
pure virtual |
Create an XYZ profile with the given parameters.
whitePoint | A three entry vector describing the white point of the color space, in the CIE XYZ color space. |
blackPoint | Optional. A three entry vector describing the black point of the color space, in the CIE XYZ color space. If not supplied, the values 0,0,0 will be used. |
|
pure virtual |
Delete the DeviceLink ICC profile associated with the specified combination of the source color space and the destination color space.
sourceSpace | The desired input color space. |
destSpace | The desired output color space. |
|
pure virtual |
Convenience version of deleteDeviceLinkForConversionsBetween() that accepts IDOMICCProfiles instead of IDOMColorSpaceICCBased.
sourceProfile | The desired input color profile. |
destProfile | The desired output color profile. |
|
static |
Get the color manager singleton. Throws an IEDLError on failure.
pFactory | The EDL Class factory to use |
|
pure virtual |
Retrieve the built-in CMYK SWOP profile.
|
pure virtual |
Obtain the current black point compensation default setting.
Please see the description for setDefaultBlackPointCompensation() for details.
|
pure virtual |
Find the default rendering intent for an ICCBased color space.
space | The ICC space to interrogate |
|
pure virtual |
Query the default black point preservation for non-text objects.
|
pure virtual |
Query the default black point preservation for text objects.
|
pure virtual |
Get the intercept color space for DeviceCMYK. This is the color space that will be used for conversion if the color manager is asked to convert from or to DeviceCMYK. The default DeviceCMYK intercept is a CMYK SWOP ICCBased color space.
|
pure virtual |
Get the intercept color space for DeviceGray. This is the color space that will be used for conversion if the color manager is asked to convert from or to DeviceGray. The default DeviceGray intercept is sGray.
|
pure virtual |
Get the DeviceLink ICC profile and the associated color spaces.
index | The index of DeviceLink ICC profile which has already been set. |
sourceSpace | The input color space associated with the DeviceLink ICC profile. |
destSpace | The output color space associated with the DeviceLink ICC profile. |
deviceLink | The desired DeviceLink ICC profile. |
|
pure virtual |
Get the intercept color space for DeviceRGB. This is the color space that will be used for conversion if the color manager is asked to convert from or to DeviceRGB. The default DeviceRGB intercept is sRGB.
|
pure virtual |
Get any PostScript CSA present in an ICC Based color space. These are found under the 'ps2s' tag in an ICC profile, and are optional.
csaMemory | A reference to a simple buffer to store the given csa. |
space | The ICC Based color space to process. |
|
pure virtual |
Setting that determines how the color manager will convert DeviceGray colors to DeviceCMYK.
|
pure virtual |
Find the number of components for an ICCBased color space.
space | The ICC space to interrogate |
|
pure virtual |
Find the number of components for an ICC profile.
profile | The ICC profile to interrogate |
|
pure virtual |
Get the number of DeviceLink ICC profiles which have been set.
|
pure virtual |
Get an equivalent PostScript CSA for an ICC based color space. This will be a CIEBased color space in the form of PostScript code.
csaMemory | A reference to a simple buffer to store the generated csa. |
space | The ICC Based color space to process. |
intent | The intent for which the CSA should be generated. |
|
pure virtual |
Get the profile class of the profile used for the given ICC color space.
space | The ICC color space to interrogate. |
|
pure virtual |
Get the color space type for an ICCBased color space.
space | the ICC space to interrogate |
|
pure virtual |
Get the profile connection space (PCS) type for the profile used for the given ICC color space.
space | The ICC color space to interrogate. For device link profiles this will be the canonical output space. |
|
pure virtual |
Get a profile for the given space, if possible. For ICCBased color spaces, this simply returns the profile.
For all other color space types, NULL will be returned.
space | The color space to get the profile for. |
|
pure virtual |
Determine if the profile used for the given ICC color space has support for the given intent for the given usage. Matrix shaper style profiles support every intent. LUT-based profiles may have explicit support for some intents.
space | The ICC color space to interrogate. |
intent | The intent to query. |
input | Set to true if querying for use as an input, false if querying for use as an output. |
|
pure virtual |
Get the name of the profile for an ICCBased color space.
space | The ICC color space to interrogate. |
name | Reference to receive the profile name |
|
pure virtual |
Get the version number of the profile used for the given ICC color space.
space | The ICC color space to interrogate. |
majorVersion | Reference to receive the major version |
minorVersion | Reference to receive the minor version |
|
pure virtual |
Retrieve the built in scRGB profile.
|
pure virtual |
Retrieve the built-in sGray profile.
|
pure virtual |
Retrieve the built-in sRGB profile.
|
pure virtual |
Gets the intercept associated with the given space if any, or return the original space if not. It is safe to pass any color space to this member.
space | The color space to find the intercept for. |
|
pure virtual |
Set the default behaviour for black point compensation when (and only when) eBPCDefault is used by convertColors() routines.
Note that black point compensation will not apply to cases where an absolute rendering intent is used.
The choices are:
defaultBpc | The default black point compensation to use. |
|
pure virtual |
Set the default for black point preservation across the Jaws Mako instance.
Please note that this has no direct effect in IColorManager, but instead provides: - The default setting for IColorConverterTransform::setBlackPreservation() - The default setting for IRendererTransform::setBlackPreservation() - The default setting for IJawsRenderer::setBlackPreservation() The default is false for both text and non-text (other).
|
pure virtual |
Set the intercept color space for DeviceCMYK. This is the color space that will be used for conversion if the color manager is asked to convert from or to DeviceCMYK.
space | The desired DeviceCMYK intercept color space. |
|
pure virtual |
Set the intercept color space for DeviceGray. This is the color space that will be used for conversion if the color manager is asked to convert from or to DeviceGray.
space | The desired DeviceGray intercept color space. |
|
pure virtual |
Set the intercept color space for DeviceRGB. This is the color space that will be used for conversion if the color manager is asked to convert from or to DeviceRGB.
space | The desired DeviceRGB intercept colorspace. |
|
pure virtual |
Configure how DeviceGray colors are converted to DeviceCMYK.
Normally, all color conversions in JawsMako are achieved using color management. In particular, this includes the DeviceGray, DeviceCMYK and DeviceRGB color spaces, which are converted using the intercept color spaces configured in the functions below.
However this means that conversions between DeviceGray and DeviceCMYK generally pass through ICC conversion. Gray values may not map exclusively to DeviceCMYK K values, resulting in non-zero values in the Cyan, Magenta and Yellow components.
This may be unsuitable in some environments, in particular when dealing with overprint simulation.
This behavior can be changed with this member. If the argument is
mapGrayDirectly | Determine how DeviceGray colors are converted to DeviceCMYK |
|
pure virtual |
Tests whether the result of gamut checking is within the gamut of the destination color space.
Currently, only base color spaces are supported; Indexed and DeviceN spaces cannot be used.
Device Link profiles are not supported.
numColors | The number of colors to test. |
sourceSpace | The color space describing the input samples. |
destSpace | The desired destination color space. |
intent | The desired rendering intent for the test. |
bpc | The desired handling of black point compensation. If in doubt, use eBPCDefault. |
inColors | Pointer to the input sample buffer. |
|
pure virtual |
Set the DeviceLink ICC profile with specifying a combination of the source color space and the destination color space. If the same combination of sourceSpace and destSpace was specified with different DeviceLink ICC profile, the old DeviceLink ICC profile is replaced with the new DeviceLink ICC profile.
sourceSpace | The desired input color space. |
destSpace | The desired output color space. |
deviceLink | The desired DeviceLink ICC profile. |
|
pure virtual |
Convenience version of useDeviceLinkForConversionsBetween() that accepts IDOMICCProfiles instead of IDOMColorSpaceICCBased.
sourceProfile | The desired input color profile. |
destProfile | The desired output color profile. |
deviceLink | The desired DeviceLink ICC profile. |