sgi2ps(1)

sgi2ps - convert an SGI image file to PostScript

As shipped in IRIX 6.5. First release of IRIX 6.5.

NAME
     sgi2ps - convert an SGI image file to PostScript

SYNOPSIS
     sgi2ps [-O filename] [-L filename] [-B]
            [-C colorspace] [-F] [-f] [-r angle]
            [-p imageRes] [-z factor] [-n nCopies]
            [-G g0[,g1,g2]] [-N nUpX[,nUpY]]
            [-I filename] [-c filename] [-h] [-D]
            [SGIImageFilename ...]

DESCRIPTION
     sgi2ps converts raster files in SGI image format into PostScript code.
     The program provides a number of image transformation capabilities
     including zooming, rotation and gamma correction. In addition, sgi2ps
     provides the capability to display multiple images on a single physical
     page.

   Command Line Options
     Typically, sgi2ps expects at least one SGI image file to be specified as
     input on the command line after all option switches. If no image file is
     specified on the command line, sgi2ps will read from the standard input.
     By default, sgi2ps assumes that its output should be written to the
     standard output and messages should be written to standard error.

     -O filename
               Specifies the name of the file to which the PostScript output
               will be sent.  If the -O option is not specified, output will
               be sent to the standard output.

     -L filename
               Specifies the name of the file to which error, warning and
               informational messages are to be written. If the file specified
               already exists, any messages generated by sgi2ps will be
               appended to the end of the file.  If the -L option is not
               specified, message output will be sent to standard error.

     -B        Specifies that binary PostScript should be output where
               applicable. The majority of the output from sgi2ps is bitmap
               image data. By default this data is output as ASCII hexadecimal
               values. Specifying -B will output this image data as binary
               values thereby cutting in half the number of bytes of
               PostScript data output. However, binary data output should only
               be used when the communications channel between sgi2ps and the
               PostScript interpreter can accept 8-bit data. This precludes
               the use of the -B switch when transmitting output over serial
               connections.

     -C colorspace
               Specifies the output data colorspace. The value of colorspace
               may be one of the following: w (black and white), the default,
               cmyk, or rgb. The PostScript produced by cmyk and rgb can only
               be interpreted by a Level 2 PostScript interpreter or a Level 1
               interpreter with the CMYK color extensions (e.g. psrip(1)). The
               PostScript produced by w can be sent to any Level 1
               interpreter. The colorspace conversion equations used by sgi2ps
               are:


               W to RGB: r = g = b = w

               W to CMYK: c = m = y = 0; k = 1 - w

               RGB to W: w = 0.299 r + 0.587 g + 0.114 b

               RGB to CMYK:
               ci = 1 - r; mi = 1 - g; yi = 1 - b
               k = min(ci, mi, yi)
               c = ci - k; m = mi - k: y = yi - k

     -F        Specifies that the image should be oriented so that it best
               fits the page.  That is, the image is oriented such that its
               longer dimension is parallel with the longer dimension of the
               paper. If -F is specified, any rotation specified by the -r
               switch is ignored. By default the image is oriented with zero
               degrees of rotation unless the -r switch specifies a different
               rotation.

     -f        Specifies that the output image should be flipped (mirrored)
               about the vertical axis. This flag is useful when creating
               transparencies.  Note that flipping of the image is performed
               after any rotation. Therefore, the image is always flipped
               about the vertical axis.

     -r angle  Specifies that the image is to be rotated by angle degrees.
               angle may be any positive or negative integer value. Positive
               rotations are counter-clockwise measured from the horizontal
               axis. The default rotation angle is 0. Note that rotation is
               performed before any image flipping (-f). The -r switch is
               ignored if the best-fit switch -F is specified.

     -z factor and -p imageRes
               Each of these switches provides scaling of the original image.
               The two switches are mutually exclusive.

               The -z switch provides image zooming.  factor is a positive
               floating point value typically between 0.0 and 1.0. A zoom
               factor of 1.0, the default, indicates that the image should be
               scaled to fit the entire page while preserving the original
               image's aspect ratio. A zoom factor of 0.5 would produce an
               image sized to 50% of that needed to fit the entire page. A
               zoom factor of 0.0 produces no zooming. Instead the image is
               output at its original size.

               If an image must be sized based on a given resolution, the -p
               switch should be specified in place of the -z switch. The
               imageRes argument specifies the resolution used to size the
               image in dots per inch. This resolution is independent of the
               output device resolution. For example, suppose an image is one
               inch by one inch when displayed on a 96 dpi monitor. In order
               to print that image on a 300 dpi printer so that it remains one
               inch by one inch the -p switch would be specified with an
               imageRes of 96.

     -n nCopies
               Specifies the number of copies to produce of each page.
               Specifying this switch simply sets the value of the #copies
               variable in the output PostScript code. The value of this
               variable is used by the PostScript operator showpage to
               determine the number of output copies to produce. By default
               the #copies variable is not specified and the number of copies
               then defaults to one.

     -G g0[,g1,g2]
               This switch provides gamma correction of the input image data.
               The gamma function is:

               corrected value = value ^ gamma

               The gamma value (g0, etc.) is typically a value between 0.0 and
               3.0. A gamma value less than 1.0 will tend to lighten the image
               while a value greater than 1.0 will tend to darken the image. A
               gamma of 1.0 will leave the image data unchanged.  The gamma
               value may be specified for each input color channel
               individually or as a group. If g0 is the only gamma value
               specified, this value will be applied to all output channels.
               Note that a black and white image contains one input color
               channel, and an RGB image contains three input channels. The
               default gamma value is 1.0 for all channels.

     -N nUpX[,nUpY]
               sgi2ps allows multiple SGI image files to be specified on the
               command line. By default, each image is output on a separate
               physical page.  The -N switch provides the capability to divide
               up one physical page into multiple virtual pages. This is often
               called n-up display. Using n-up, multiple image files can be
               displayed on the same physical page. If only the nUpX value is
               specified the physical page will be divided into nUpX by nUpX
               virtual pages. If both nUpX and nUpY are specified, the
               physical page will be divided into nUpX by nUpY virtual pages.
               Images are displayed in row (horizontal) major order.  Note
               that nUpX is measured along the horizontal, x, axis. For an 8.5
               by 11.0 inch page, the horizontal axis is the short dimension
               in portrait mode and the long dimension in landscape mode.
               Rotation is performed on each image individually and best-fit
               orientation is determined for each image individually. Zooming
               is relative to the virtual page size. Note that image
               replication is not performed. The number of images specified on
               the command line is the number of images displayed in the
               virtual pages.

     -I filename
               sgi2ps places a PostScript code prolog at the start of the
               output file.  By default, this prolog code is read from the
               file /usr/lib/print/data/PSImageProlog.  The -I switch allows a
               different prolog file to be specified. This switch is not
               intended for general use.

     -c filename
               The most common form of SGI Image file is the so called Normal
               image. This image contains the actual intensity values for each
               image channel at each pixel location.  Another form of SGI
               Image file is the so called Screen image. This image consists
               of a single value at each pixel. The value is an index into a
               colormap that contains the actual pixel intensity values for
               each channel. This type of image is also referred to as a
               colormap image. In order to process a colormap image, the
               colormap that corresponds to the image must be specified. By
               default sgi2ps obtains its colormap from the file
               SGIDefColormap.map. This file contains the default SGI system
               colormap.  The -c option can be used to specify a different
               colormap file. A colormap file can be created using the
               makemap(1G) and savemap(1G) programs. This switch is not
               intended for general use.

     -h        Prints a program usage message to the standard error. This
               usage message also lists the currently supported output
               configurations.

     -D        Specifies verbose output for debugging purposes.

NOTES
     1.   The PostScript output produced by sgi2ps conforms to the Adobe
          PostScript Document Structuring Conventions Version 3.0 as specified
          in Appendix G of the "PostScript Language Reference Manual", 2nd
          edition.

     2.   The sgi2ps program supersedes the rgb2ps program. The rgb2ps program
          should not be used for new development and may be removed from
          future releases.

     3.   The PostScript output produced by sgi2ps primarily wraps the input
          bitmap image data with PostScript instructions. Therefore, the
          amount of output data can be quit large especially if multiple image
          files are specified or if the images are large. The size of the
          output file should be kept in mind when sending the PostScript
          output over a slow communications channel such as a serial line.

     4.   If sgi2ps is given an unrecognized or incomplete command line option
          switch, it will print a warning message to the standard error,
          ignore the option and continue processing.

     5.   If an image file is specified on the command line, sgi2ps will not
          read its stdin for images.

     6.   Processing an SGI Image format file requires random seeking within
          the file.  Therefore, when sgi2ps is obtaining its input image from
          a pipe to standard input, a disk based copy of the input image must
          be created.  This temporary image file will be created in the
          directory specified by the TMPDIR environment variable. If that
          variable is not set, the temporary file will be created in /var/tmp.
          There must be sufficient free space in the temporary file directory
          to store a complete copy of the image file or sgi2ps will fail.

     7.   sgi2ps can only process a single image file when reading from
          standard input.

     8.   Previous versions of sgi2ps performed gamma correction on the output
          data. Starting with Impressario 1.2, sgi2ps performs gamma
          correction on the input image data.

     9.   sgi2ps can process Normal and Screen format SGI Image files. Images
          in the obsolete Dither format must be converted to Normal format
          images using the fromdi(6D) program.

FILES
     /usr/lib/print/sgi2ps                     Program file
     /usr/lib/print/data/PSImageProlog         PostScript prolog file
     /usr/lib/print/data/SGIDefColormap.map    Default colormap file

TRADEMARKS
     PostScript is a registered trademark of Adobe Systems, Inc.

SEE ALSO
     psrip(1), stiff2ps(1), PostScript Language Reference Manual - 2nd ed.,
     Adobe Systems, Inc., makemap(1G), savemap(1G), fromdi(6D)