![]() |
PATH![]() |
![]() ![]() |
The ColorSync Manager provides three functions that support color matching by PostScript Level 2 devices. The default CMM implements these functions if the preferred CMM corresponding to the profile does not.
CMGetPS2ColorSpace
obtains color space element data in text format usable as the parameter to the PostScript
setColorSpace
operator, which characterizes the color space of subsequent graphics data.CMGetPS2ColorRenderingIntent
obtains the rendering intent element data in text format usable as the parameter to the PostScript
findRenderingIntent
operator, which specifies the color-matching option for subsequent graphics data.CMGetPS2ColorRendering
obtains the color rendering dictionary (CRD) element data usable as the parameter to the PostScript
setColorRendering
operator, which specifies the PostScript color rendering dictionary to use for the following graphics data.CMGetPS2ColorRenderingVMSize
determines the virtual memory size of the color rendering dictionary (CRD) for a printer profile before your application or driver obtains the CRD and sends it to the printer.Starting with PostScript version 2016, to provide better support for ColorSync and ICC profiles, Postscript Level 2 supports up to four-component color spaces through the addition of CIEBasedDEF and CIEBasedDEFG color spaces.
To use these new color spaces, starting with ColorSync version 2.1, the CMGetPS2ColorSpace function supports profiles with four components, as well as scanner and monitor profiles that contain multidimensional table information. In previous versions of ColorSync, routines such as CMGetPS2ColorSpace returned an error if asked to generate PostScript code for a profile with more than three components.
The CIEBasedDEF and CIEBasedDEFG color spaces are extensions to the CIEBasedABC color space. To work with these color spaces, PostScript defines the RangeDEF, RangeHIJK, DecodeDEFG, and Table arrays. You can read more about how these arrays are used to convert CIEBasedDEF and CIEBasedDEFG color space values in the PostScript Language Reference Manual Supplement , version 2016.
IMPORTANT
If you use ColorSync to generate PostScript output for CIEBasedDEF and CIEBasedDEFG color spaces, be sure the printer has PostScript version 2016 or later.
Obtains color space element data in text format usable as the parameter to the PostScript setColorSpace operator, which characterizes the color space of subsequent graphics data.
pascal CMError CMGetPS2ColorSpace (
CMProfileRef srcProf,
unsigned long flags,
CMFlattenUPP proc,
void *refCon,
Boolean *preferredCMMnotfound);
MyColorSyncDataTransfer
.MyColorSyncDataTransfer
function. The CMGetPS2ColorSpace function obtains PostScript color space data from the source profile. The valid profile classes for the CMGetPS2ColorSpace function are display, input, and output profiles with at most four components.
To determine which profile elements to use to generate the PostScript color space data, the CMM:
The CMM obtains the PostScript data from the profile and calls your low-level data transfer procedure passing the PostScript data to it. The CMM converts the data into a PostScript stream and calls your procedure as many times as necessary to transfer the data to it.
Typically, the low-level data transfer function returns this data to the calling application or device driver to pass to a PostScript printer as an operand to the PostScript setcolorspace operator, which defines the color space of graphics data to follow.
The CMGetPS2ColorSpace function is dispatched to the CMM component specified by the source profile. If the designated CMM is not available or the CMM does not implement this function, then the ColorSync Manager dispatches the function to the default CMM.
Obtains the rendering intent element data in text format usable as the parameter to the PostScript findRenderingIntent operator, which specifies the color-matching option for subsequent graphics data.
pascal CMError CMGetPS2ColorRenderingIntent (
CMProfileRef srcProf,
unsigned long flags,
CMFlattenUPP proc,
void *refCon,
Boolean *preferredCMMnotfound);
MyColorSyncDataTransfer
. MyColorSyncDataTransfer
function. The CMGetPS2ColorRenderingIntent function obtains PostScript rendering intent information from the header of the source profile. It returns data by calling your low-level data transfer procedure and passing the PostScript data to it. Typically, your low-level data transfer function returns this data to the calling application or device driver to pass to a PostScript printer.
The CMGetPS2ColorRenderingIntent function is dispatched to the CMM component specified by the source profile. If the designated CMM is not available or the CMM does not implement this function, then ColorSync dispatches the function to the default CMM.
Obtains the color rendering dictionary (CRD) element data usable as the parameter to the PostScript setColorRendering operator, which specifies the PostScript color rendering dictionary to use for the following graphics data.
pascal CMError CMGetPS2ColorRendering (
CMProfileRef srcProf,
CMProfileRef dstProf,
unsigned long flags,
CMFlattenUPP proc,
void *refCon,
Boolean *preferredCMMnotfound);
MyColorSyncDataTransfer
. MyColorSyncDataTransfer
function. The CMGetPS2ColorRendering function obtains CRD data from the profile specified by the dstProf parameter. To be valid, the parameter must specify an output profile with at most four components. The CMM uses the rendering intent from the profile specified by the srcProf parameter to determine which of the PostScript tags ( ps2CR0Tag , ps2CR1Tag , ps2CR2Tag , or ps2CR3Tag ) to use in creating the CRD. If none of these tags exists in the profile, the CMM creates the CRD from one of the multidimensional table tags ( cmAToB0 , cmAToB1 , or cmAToB2 ), again chosen according to the rendering intent of the profile specified by the srcProf parameter.
This function is dispatched to the CMM component specified by the destination profile. If the designated CMM is not available or the CMM does not implement this function, the ColorSync Manager dispatches this function to the default CMM.
The CMM obtains the PostScript data and passes it to your low-level data transfer procedure, specified by the proc parameter. The CMM converts the data into a PostScript stream and calls your procedure as many times as necessary to transfer the data to it. Typically, the low-level data transfer function returns this data to the calling application or device driver to pass to a PostScript printer.
Before your application or device driver sends the CRD to the printer, it can call the function
CMGetPS2ColorRenderingVMSize
to determine the virtual memory size of the CRD.
Determines the virtual memory size of the color rendering dictionary (CRD) for a printer profile before your application or driver obtains the CRD and sends it to the printer.
pascal CMError CMGetPS2ColorRenderingVMSize (
CMProfileRef srcProf,
CMProfileRef dstProf,
unsigned long *vmSize,
Boolean *preferredCMMnotfound);
Your application or device driver can call this function to determine if the virtual memory size of the color rendering dictionary exceeds the printer's capacity before sending the CRD to the printer. If the printer's profile contains the Apple-defined optional tag
'psvm'
described in
CMConcatProfileSet
, then the default CMM will return the data supplied by this tag specifying the CRD virtual memory size for the rendering intent's CRD. If the printer's profile does not contain this tag, then the CMM uses an algorithm to assess the VM size of the CRD, in which case the assessment can be larger than the actual maximum VM size.
The CMM uses the profile specified by the srcProf parameter to determine the rendering intent to use.