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 3 - ColorSync Manager Reference for Applications and Device Drivers / ColorSync Manager Functions
Profile Searching / Searching for a Profile by Profile Identifier


CMProfileIdentifierFolderSearch

Searches the ColorSyncTM Profiles folder and returns a list of profile references, one for each profile that matches the specified profile identifier.

pascal CMError CMProfileIdentifierFolderSearch (
CMProfileIdentifierPtr ident,
unsigned long *matchedCount,
CMProfileSearchRef *searchResult);
ident
A pointer to a profile identifier structure specifying the profile to search for.
matchedCount
A pointer to a value of type unsigned long. On output, the one-based count of profiles that match the specified profile identifier. The count is typically 0 or 1, but can be higher.
searchResult
A pointer to a search result (page 3-51). On output, a reference to the profile search result list.
function result
A result code of type CMError. See "Result Codes" (page 3-174) for a list of ColorSync-specific result codes. It is not an error condition if this function finds no matching profiles. It returns an error only if a File Manager or other low-level system error occurs.
DISCUSSION
When your application or device driver processes an image, it typically keeps a list of profile references for each profile it encounters in the image. Each time it encounters an embedded profile identifier, your application first calls the CMProfileIdentifierListSearch function (page 3-140) to see if there is already a matching profile in its list. If not, it calls the CMProfileIdentifierFolderSearch function to see if the profile is located in the ColorSyncTM Profiles folder.

Although there should typically be at most one profile in the ColorSyncTM Profiles folder that matches the profile identifier, two or more profiles with different filenames may qualify. It is not an error condition if the CMProfileIdentifierFolderSearch function finds no matching profiles.

For sample code demonstrating how to use CMProfileIdentifierListSearch, see "Searching for a Profile That Matches a Profile Identifier" in Advanced Color Imaging on the Mac OS.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996