KCMS CMM Developer's Guide

Profiles

This chapter would not be complete without a discussion on profiles. You write a CMM to create profile(s) that meet your special requirements. This section describes the KCMS profile standard. It makes recommendations regarding the portability of the profiles your CMM creates. Finally, it explains how to set up the profiles so that your CMM can use them.

KCMS uses the ICC profile format as the default profile format. The ICC profile format specification to which this version of KCMS conforms is located on-line in /usr/openwin/demo/kcms/docs/icc.ps. (For the most current version of the ICC specification, check the web site at http://www.color.org.) By supporting the ICC specification, the profiles your CMM creates can be used on all participating vendors' color management systems.

Much of the work in processing and handling ICC format profiles is included by default in the framework. To speed your development cycle, use as much of this default technology as possible. You can develop your own profile format within the framework.


Note -

It is strongly recommended that you extend the ICC profile format rather than develop your own. If you do not use the ICC profile format your profiles will not be easily ported to other platforms.


ICC Profile Header

Table 2-4 shows the ICC profile header. For details on the profile header fields, see the ICC profile format specification. The KCMS-specific header is defined in icc.h, and KCMS attributes are registered with the ICC. (The profile header and all attribute structures and definitions that pertain to KCMS also are described in Chapter 5, "Profile Attributes," in the SDK manual KCMS Application Developer's Guide.)

Note that the CMM Id must in a fixed place (bytes 4-7) in the header .

Table 2-4 ICC Profile Header Format

Byte offset 

Content 

0-3 

Profile size 

4-7 

CMM type (CMM Id) 

8-11 

Profile version number 

12-15 

Profile/device class 

16-19 

Color space of data 

20-23 

Profile connection space (PCS) (CIEXYZ or CIELAB only) 

24-35 

Date and time this profile was first created 

36-39 

`acsp' (61637370h) profile file signature (magic number) 

40-43 

Primary platform target for the profile 

44-47 

Flags indicating various options for CMM such as distributed processing and caching 

48-51 

Device manufacturer of the device for which this profile is created 

52-55 

Device model number of the device for which this profile is created 

56-63 

Device attributes unique to the particular device setup such as media type 

64-67 

Rendering intent 

68-79 

XYZ values of the illuminant of the PCS. 

80-83 

Profile creator identifier 

84-127 

Reserved for future use 

Naming and Installing Profiles

Any profile you want to include in the KCMS library must be named according to specified conventions to avoid name clashes and promote portability. The paragraphs below explain how to name and install your profile so that it can be automatically used in the KCMS framework.

Naming Profiles

The KCMS profile name is a filename with the following naming convention:

<CMM

ID><stock

symbol><device>.<type>

Table 2-5 describes the fields in the profile filename:

Table 2-5 Profile Filename Description

Profile Filename Field 

Description 

CMM ID 

A mnemonic. Solaris-supplied profiles use kcms as the CMM ID. Choose your own mnemonic for profiles you create.

stock symbol 

Short mnemonic used by the stock market for your company or a unique identifier. 

device 

Unique string identifying the device or color space. See Table A-1 for devices supported by Solaris.

type 

ICC profile format standard filename suffixes. See Table 2-6 .

Profile Filename Suffixes

Table 2-6 describes the various filename suffixes for profiles for the Solaris environment.

Table 2-6 Profile Filename Suffixes

Filename Suffix (type)

Description 

inp

Input devices (scanners, digital cameras and Photo CDs) 

mon

Display devices (CRTs and LCDs) 

out

Output devices such as printers 

spc

Color space conversion transformations 

link

Device link transformations 

abst

Abstract transformations for special color effects

Installing Profiles

If you use the file type KcsSolarisFile in the KcsLoadProfile()() function, you must install profiles where the KCMS framework can locate them . The KCMS framework searches for profiles in the following directories in the order listed below:

  1. Local current directory

    Typically a CMM creates profiles in the directory in which it is being run.

  2. Directories specified by the KCMS_PROFILES environment variable

    KCMS_PROFILES is a colon-separated list of directory paths to profiles. You can set this variable on a per-user or work-group basis. You may want to use this variable to set the path to temporary profiles your CMM creates.

  3. /etc/openwin/devdata/profiles

    This directory contains the local or machine-specific copies of configured profiles, for example, X Window System visual profiles.

  4. /usr/openwin/etc/devdata/profiles

    This directory always contains read-only files.


Note -

All profiles for distribution (whether you create them or they are supplied with the Solaris operating system) should be written as superuser and read only to protect them from being overwritten.



Note -

If you use the file type KcsFile in the KcsLoadProfile()() function, when the application opens the profile, you can name it anything you want.


Supported Devices

For a list of the devices supported by the KCMS framework, see Appendix A, Supported Devices .