Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Advanced Color Imaging Reference /
Chapter 4 - ColorSync Manager Reference for Color Management Modules / Optional CMM-Defined Functions
/


MyCMMGetPS2ColorRenderingVMSize

Handles the kCMMGetNamedColorValue request by obtaining the maximum virtual memory (VM) size of the color rendering dictionary (CRD) for the rendering intent specified by the source profile.

A CMM may respond to the kCMMGetPS2ColorRenderingVMSize request code, but it is not required to do so. The ColorSync Manager sends this request code to your CMM on behalf of an application that called the CMGetPS2ColorRenderingVMSize function. The ColorSync Manager dispatches this request to the Component Manager, which calls your CMM to service the request. A CMM typically responds to the kCMMGetPS2ColorRenderingVMSize request code by calling a CMM-defined function (for example, MyCMMGetPS2ColorRenderingVMSize) to handle the request.

The MyCMMGetPS2ColorRenderingVMSize function is a color management module-defined subroutine.

pascal CMError MyCMMGetPS2ColorRenderingVMSize(
ComponentInstance CMSession, 
CMProfileRef srcProf,
CMProfileRef dstProf,
unsigned long vmSize);
CMSession
A handle to your CMM's storage for the instance of your component associated with the calling application or device driver.
srcProf
A profile reference to the source profile specifying the rendering intent to use.
dstProf
A profile reference to the destination printer profile from which you obtain or assess the virtual memory (VM) size of the CRD.
vmSize
The VM size of the CRD, returned by the function.
function result
A result code of type CMError. See "Result Codes" (page 3-172) for a list of ColorSync-specific result codes.
DISCUSSION
Only for special cases should a custom CMM need to support this request code. If your CMM supports this function, your MyCMMGetPS2ColorRenderingVMSize function must obtain the maximum VM size of the CRD for the rendering intent specified by the source profile.

Your function must return the VM size in the vmSize parameter. (In turn, the ColorSync Manager returns the VM size to the calling application or device driver.) The CRD whose maximum size you return must be that of the dictionary for the rendering intent specified by the source profile.

If the destination profile contains the Apple-defined private tag 'psvm', described later in this section, then your CMM may read the tag and return the CRD VM size data supplied by this tag for the specified rendering intent. If the destination profile does not contain this tag, then you must assess the VM size of the CRD. In this case, the assessment may be larger than the actual maximum VM size.

The CMPS2CRDVMSizeType data type defines the Apple-defined 'psvm' optional tag that a profile may contain to identify the maximum VM size of a CRD for different rendering intents. This tag's element data includes an array containing one entry for each rendering intent and its virtual memory size.

The CMIntentCRDVMSize data type defines the rendering intent and its maximum VM size:

struct CMIntentCRDVMSize {
   long        renderingIntent;
   unsigned long VMSize; 
};
For example, a rendering intent might be 0 and its VM size 120 KB.

Constant descriptions

renderingIntent
The rendering intent whose CRD VM size you want to obtain. Rendering intent values are
0 (cmPerceptual)
1 (cmRelativeColorimetric)
2 (cmSaturation)
3 (cmAbsoluteColorimetric)
VMSize
The VM size of the CRD for the rendering intent specified for the renderingIntent field.
The CMPS2CRDVMSizeType data type for the tag includes an array containing one or more members of type CMIntentCRDVMSize:

struct CMPS2CRDVMSizeType {
   OSType  typeDescriptor; 
   unsigned long   reserved; 
   unsigned long   count; 
   CMIntentCRDVMSize   intentCRD[1]; 
};
Constant descriptions

typeDescriptor
The 'psvm' tag signature.
reserved
Reserved for future use.
count
The number of entries in the intentCRD array.
intentCRD
A variable-sized array of four or more members defined by the CMIntentCRDSize data type.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996