IMG2EPS(1)

NAME
img2eps - package raster images into EPS file

SYNOPSIS
[-123] [-a | --ascii ENC] [--bottom-margin M] [-C | --compress C] [-c | --stdout] [-G | --gravity G] [-g | --gray | --grey] [-h | --help] [--height H] [--ignore-order] [--left-margin M] [--level] [-m | --margin M] [-n | --dry-run] [-O | --orientation O] [-o | --output FILE] [-P | --paper P] [-r | --resolution R] [-R | --recompress] [--right-margin M] [-s | --size S] [--top-margin M] [-v | --verbose] [-V | --version] [--width W] file ...

DESCRIPTION
img2eps packages each file into an EPS (Embedded PostScript) file, using whatever PostScript features are advantageous. The default name for each output file is the name of the input file with its extension changed to .eps. Supported image file formats are:
•   GIF
•   JPEG
•   PNG
•   TIFF
•   XPM

If possible, the compressed image data is copied directly to the EPS file.

The Options
-1  Use only features present in PostScript language level 1.
-2  Use only features present in PostScript language level 2.
-3  Explicitly allow the use of PostScript language level 3 features.
-a ENC
--ascii ENC
    Use ENC ASCII encoding for binary data. Supported encodings are:
    •   ASCII85
    •   ASCIIHEX
--bottom-margin M
    Set bottom margin to M.
-C C
--compress C
    Use compression method C for image data. Supported compression methods are:
    •   DCT (jpeg)
    •   Flate (zlib)
    •   LZW
    •   RunLength (PackBits)
-c
--stdout
    Write EPSF to standard output. If this option is used, only one input file may be specified.
-G G
--gravity G
    Specify the placement of image within the printable area of the page. The gravity can be either a pair of numbers (see below) in the range of 0 to 1 inclusive, which specify how much of the free space is placed to the left / above the image, or one of the following pre-defined settings:
    •   top-left
    •   top
    •   top-right
    •   left
    •   center
    •   right
    •   bottom-left
    •   bottom
    •   bottom-right
-g
--gray
    Convert image to grayscale.
-height H
    Specify the height of the image to be H, which should be a dimen (see below). The width will be computed to keep the aspect ratio of the original image.
-h
--help
    Display a short help message.
--ignore-order
    Ignore pixel order information from image and assume row major left to right, top to bottom.
--left-margin M
    Set left margin to M, which should be a dimen (see below).
--level L
    Use only features present in PostScript language level L. Alternatively, you can also use the -1, -2, and -3 options.
-m M
--margin M
    Set all margins to M, which should be a dimen (see below).
-n
-dry-run
    Don't create EPSF, only print information about what would have been done.
-O O
--orientation O
    Set orientation (rotation) of image:
    portrait
        Don't rotate image.
    landscape
        Rotate image 90 degrees counter-clockwise.
    upside-down
        Rotate image 180 degrees.
    seascape
        Rotate image 90 degrees clockwise.
    auto
        Use portrait or landscape, whichever fits the image better.
-o FILE
--output FILE
    Write EPSF to output file FILE. If this option is used, only one input file may be specified.
-P P
--paper P
    Set paper size to P. The paper size can be specified either as a pair of dimens (see below), or by using one of the following pre-defined sizes:
    •   10x14
    •   A3, A4, A5
    •   B4, B5
    •   executive
    •   folio
    •   ledger
    •   legal
    •   letter
    •   quarto
    •   statement
    •   tabloid
-r R
--resolution R
    Specify the resolution to print the image at, in dpi (dots per inch). R can be a number to specify equal horizontal and vertical resolution or a pair of numbers (see below) to specify horizontal and vertical resolutions separately.
-R
--recompress
    Force recompression of image data, even if a direct copy would be possible. This might be necessary since PostScript stricter image data constraints than other image manipulation software.
--right-margin M
    Set right margin to M, which should be a dimen (see below).
-S S
--size S
    Specify the size of the printed image. S should be a pair of dimens (see below).
--top-margin M
    Set top margin to M, which should be a dimen (see below).
-V
--version
    Display version number.
-width W
    Specify the width of the image to be W, which should be a dimen (see below). The height will be computed to keep the aspect ratio of the original image.

  Dimens and Pairs
A dimen is a number optionally followed by a unit. Supported units are:
•   cm
•   in
•   mm
•   pt (PostScript point, 1/72in)
If no unit is specified, pt is assumed.

A pair of numbers should be separated by any one of ‘x’, ‘*’, or ‘’,.

A pair of dimens is a pair of numbers optionally followed by a unit, which applies to both numbers of the pair.

  Language Levels
There are three major versions of PostScript, called Language Levels:

Language Level 1 only supports ASCIIHEX encoded, uncompressed images and does not support indexed (paletted) images.

Language Level 2 adds support for ASCII85 encoding and various compression schemes, 12 bit samples, and indexed images. Most PostScript printers support Language Level 2.

Language Level 3 adds support for Flate (zlib) compression, a patent-free lossless compression scheme. Ghostscript supports Language Level 3, as do most PostScript colour printers.

  Default Parameters
The default value for any parameter not specified via command line options is derived from the image:

The color space type is taken from the image. However, for language level 1, indexed images are converted to their base color space.

An unsupported depth is converted to the next higher supported depth, if it exists, or the highest supported depth (8 for language level 1, 12 for language level 2 or 3).

If direct copy of the compressed image data is supported, the compression method of the image is used. If the image is compressed with DCT (jpeg), DCT compression is used even if recompression is necessary. Otherwise, the best lossless compression method available is used, which is Flate for language level 3 and LZW for language level 2. Language level 1 disallows compression altogether.

ASCII85 encoding is used for language level 2 or 3, ASCIIHEX for language level 1.

If no language level is specified, the lowest level that supports the color space type, depth, and, for direct copy or DCT encoding, the compression method used.

EXIT STATUS
The img2eps utility exits 0 on success, and 0 if an error occurs.

SEE ALSO
gs(1) Adobe Systems Incorporated, PostScript Language Reference, 3rd edition, 1999.

AUTHORS
img2eps was written by Dieter Baron <dillo@giga.or.at>.

The manual page was written with the help of Thomas Klausner <tk@giga.or.at>.

The LZW compression routines and various library function replacements (for portability) were taken from the NetBSD Project.

BUGS
Since PostScript's JPEG decoder is stricter than most software implementations, directly copying JPEG compressed data causes PostScript errors for some images. This is not detected by img2eps. Use -R (--recompress) for such images.

Emulation of the colorimage operator is provided only for 8bit RGB images. (The presence of the operator is assumed for other color formats.)

Predictor functions (for LZW or Flate compression) are not supported.

TIFF images that include more than one extra sample per pixel, or use separated planar or tiled layout, are not supported. Direct copy of LZW compressed TIFF images using the old (bit-swapped) format is not supported and may result in broken EPS files.

Multi-page GIF images are not supported.