imdi/cctiff

Summary

Color convert a TIFF file using a sequence of compatible ICC device profiles, abstract profiles and device link profiles. The sequence may be zero length, facilitating format conversion and ICC profile embedding without otherwise altering the pixel values.

Usage

cctiff [-options] { [-i intent] profile.icm ...} infile.tif outfile.tif

 -v                   Verbose
 -c                   Combine linearisation curves into one transform
 -p                   Use slow precise floating point conversion, rather than fast integer routines.
 -k                   Check fast result against precise, and report differences.
 -r n                 Override the default CLUT resolution
 -o intent            Choose last profiles intent
 -e n                 Choose TIFF output encoding from 1..n
 -a                   Read and Write planes > 4 as alpha planes
 -I                   Ignore any file or profile colorspace mismatches
 -l                   This flag is ignored for backwards compatibility
 
-d profile.[icm | tiff]  Optionally embed a profile in the destination TIFF file.
                         
This may be an ICC file or a TIFF file with embedded profile.

                      Then for each profile in the linked sequence:
  -i intent            Profile intent
                        p = perceptual, r = relative colorimetric,
                        s = saturation, a = absolute colorimetric

  profile.[icm | tiff]  A Device, Link or Abstract profile. This may be an ICC file
                        or a TIFF file with embedded profile.

                                            Then finally:
 infile.tif          A TIFF Raster file that will be the input raster to be transformed.
 outfile.tif         A TIFF Raster file created from the input raster, using the given color transform.


Examples


Convert an RGB file to a CMYK file using perceptual intent:

    cctiff -ip sRGB.icm -i cmyk.icm rgbinfile.tif cmykoutfile.tif

Same as above, but use the source file embedded profile, and embed the resulting colorspace profile in the output:

    cctiff -d cmyk.icm -ip rgbfile.tif -ip cmyk.icm  rgbinfile.tif cmyout.tif

Convert a raster file using a device link:

    cctiff devicelink.icm infile.tif outfile.tif

Convert an RGB source to CMYK via an abstract adjustment, and then convert the CMYK to CMYK using a device link:

    cctiff -ir sRGB.icm abstract.icm -ir CMYK.icm devlink.icm infile.tif outfile.tif

Convert an RGB source file into an L*a*b* PCS raster file:

    cctiff -ir sRGB.icm rgbfile.tif labfile.tif

Comments

The -v flag reports extra information about the ICC profile.

The -c, -p, -k and -r options are intended to aid debugging.

The -o parameter is for backwards compatibility, and sets the intent of the last profile in the chain.

Some colorspaces can be encoded in more than one way. If there is a choice, the choice should be specified the -e parameter. If the parameter is needed, then cctiff will issue an error that describes the possible choices (ie. TIFF LAB encoding). For instance, for an LAB output there are usually two choices, 1 for CIELab encoding, and 2 for ICCLab encoding.

Normally colorspaces that have more than 4 channels will be read and written as multichannel TIFF files. These are not handled well by all applications, so the -a option causes extra channels above 4 to be stored as alpha planes, providing more flexibility in using such files.

The -I flag causes any mismatch between the color spaces of the image files and each profile in the sequence to be ignored. The results might be unpredictable unless you know exactly what you are doing.

The -l flag is just for backwards compatibility.

The -d profile.[icm | tiff] option allows an ICC profile to be embedded in the destination TIFF file. The profile may either be an ICC file or a TIFF file with embedded profile.

Following these global options, you should specify the chain of profiles you want to apply. Each link of the chain consists of the (optional) intent to be used for device profiles, and the filename of the profile. The first profiles input colorspace must be compatible with the input TIFF file, and each profiles output space must be compatible with the next profiles input space. An error will result if this is not the case.

The -i parameters selects the intent for the following device profile. Normally the same intent should be used for all device profiles, but other combinations allow special uses such as mixed proofing workflows.

The file that will be the source of the ICC profile. This can be either an ICC profile or a TIFF file that contains an embedded profile. Typically the first profile in the chain might be taken from an embedded profile from the source TIFF file.

The second last argument should be the name of the source TIFF file that is to be processed.

The last argument should be the name of the destination TIFF file to hold the results.

cctiff uses very fast integer conversion routines to process the raster. Both 8 and 16 bit per component files can be handled, and up to 8 color channels (The limit can be lifted to 15 without any trouble).