Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cocojpeg(1) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought



COCOJPEG(1)                          CMS                           COCOJPEG(1)



NAME
     cocojpeg - color correct a JPEG/JFIF image file

SYNOPSIS
     cocojpeg [ -a source_profile | -s source_profile ] -d destination_profile
              [ -h ] [ -o output_file ] [ input_file ]

DESCRIPTION
     cocojpeg uses the International Color Consortium (ICC) profiles to
     determine how to perform the appropriate color management operation
     ("color correction", hence "coco") upon a JPEG/JFIF image file. The
     operation will be a color space conversion from the input device color
     space to the output device color space.

     The device color space associated with the input stream is determined in
     one of four ways. The following approaches are tried in order:

     ⊕    First, if the -s flag is set, the specified source-profile will be
          used.  Specifying -s will override any profile embedded in the
          source image.

     ⊕    Second, if there is an ICC profile embedded in the source image,
          that will be used.

     ⊕    Third, if the -a flag is set, the specified source_profile will be
          used.  Embedded profiles take precedence over profiles specified
          with -a.

     ⊕    Finally, the color management system's default RGB profile will be
          used.  If no default is set, the system searches through
          CMSPROFILEPATH for the default monitor profile, monitor.pf.  If
          that profile is not found, cocojpeg has no way to determine a source
          device profile and so passes the input image stream through
          unchanged.

     The output device color space is determined quite simply from the value
     of the -d flag.

     If a full path is not provided for a device profile, the system looks
     through the directories specified in CMSPROFILEPATH.

     If, for any reason cocojpeg is unable to perform the requested
     conversion, the source stream is copied to the destination stream.  Some
     of the reasons that a conversion might not be performed are:

     ⊕    no destination profile was specified;

     ⊕    the number of channels in the input or output profile is not three;

     ⊕    one of the specified profiles could not be found;





                                                                        Page 1





COCOJPEG(1)                          CMS                           COCOJPEG(1)



     ⊕    one of the specified profiles could not be read;

     ⊕    the source image is one bit deep;

     ⊕    the CMS did not know how to handle one of the profiles;

     ⊕    the CMS needed to read the system RGB profile and could not.

Command Line Options
     cocojpeg supports the following command line options:

     -a source_profile
               Specifies a profile to be used with images that do not have an
               embedded ICC profile.

     -d destination_profile
               Specifies a profile for the destination device. The destination
               image file format, including the depth and number of channels,
               will be determined by this profile.

     -h        Display a usage message.

     -o output_file
               The output image file. If this is not supplied, cocojpeg will
               write to standard out.

     -s source_profile
               The profile for the source device.  This will override any
               profile embedded in the image.  If this profile does not match
               up with the source stream/source file image file format,
               cocojpeg will pass the source through unchanged.

     input_file
               The input image file.  If this is not supplied, cocojpeg will
               read from standard in.


ERRORS
     Because cocoimage is a filter, it tries to produce valid output if at all
     possible.  However, there are conditions under which cocojpeg will exit
     with an error condition. These are:

     ⊕    a source file was specified, but could not be opened;

     ⊕    a destination file was specified, but could not be opened;

     ⊕    an unrecoverable system error.








                                                                        Page 2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026