roentgen b75cab
.\" $Id: tiff2ps.1,v 1.10 2009-01-12 02:05:19 bfriesen Exp $
roentgen b75cab
.\"
roentgen b75cab
.\" Copyright (c) 1988-1997 Sam Leffler
roentgen b75cab
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
roentgen b75cab
.\"
roentgen b75cab
.\" Permission to use, copy, modify, distribute, and sell this software and 
roentgen b75cab
.\" its documentation for any purpose is hereby granted without fee, provided
roentgen b75cab
.\" that (i) the above copyright notices and this permission notice appear in
roentgen b75cab
.\" all copies of the software and related documentation, and (ii) the names of
roentgen b75cab
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
roentgen b75cab
.\" publicity relating to the software without the specific, prior written
roentgen b75cab
.\" permission of Sam Leffler and Silicon Graphics.
roentgen b75cab
.\" 
roentgen b75cab
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
roentgen b75cab
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
roentgen b75cab
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
roentgen b75cab
.\" 
roentgen b75cab
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
roentgen b75cab
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
roentgen b75cab
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
roentgen b75cab
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
roentgen b75cab
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
roentgen b75cab
.\" OF THIS SOFTWARE.
roentgen b75cab
.\"
roentgen b75cab
.ds Ps PostScript
roentgen b75cab
.if n .po 0
roentgen b75cab
.TH TIFF2PS 1 "November 2, 2005" "libtiff"
roentgen b75cab
.SH NAME
roentgen b75cab
tiff2ps \- convert a
roentgen b75cab
.SM TIFF
roentgen b75cab
image to \*(Ps\*(Tm
roentgen b75cab
.SH SYNOPSIS
roentgen b75cab
.B tiff2ps
roentgen b75cab
[
roentgen b75cab
.I options
roentgen b75cab
]
roentgen b75cab
.I "input.tif ..."
roentgen b75cab
.SH DESCRIPTION
roentgen b75cab
.I tiff2ps
roentgen b75cab
reads
roentgen b75cab
.SM TIFF
roentgen b75cab
images and writes \*(Ps or Encapsulated \*(Ps (EPS)
roentgen b75cab
on the standard output.
roentgen b75cab
By default,
roentgen b75cab
.I tiff2ps
roentgen b75cab
writes Encapsulated \*(Ps for the first image in the specified
roentgen b75cab
.SM TIFF
roentgen b75cab
image file.
roentgen b75cab
.PP
roentgen b75cab
By default,
roentgen b75cab
.I tiff2ps
roentgen b75cab
will generate \*(Ps that fills a printed area specified
roentgen b75cab
by the 
roentgen b75cab
.SM TIFF
roentgen b75cab
tags in the input file.
roentgen b75cab
If the file does not contain
roentgen b75cab
.I XResolution
roentgen b75cab
or
roentgen b75cab
.I YResolution
roentgen b75cab
tags, then the printed area is set according to the image dimensions.
roentgen b75cab
The
roentgen b75cab
.B \-w
roentgen b75cab
and
roentgen b75cab
.B \-h
roentgen b75cab
options (see below)
roentgen b75cab
can be used to set the dimensions of the printed area in inches;
roentgen b75cab
overriding any relevant
roentgen b75cab
.SM TIFF
roentgen b75cab
tags.
roentgen b75cab
.PP
roentgen b75cab
The \*(Ps generated for
roentgen b75cab
.SM RGB,
roentgen b75cab
palette, and
roentgen b75cab
.SM CMYK
roentgen b75cab
images uses the
roentgen b75cab
.I colorimage
roentgen b75cab
operator.
roentgen b75cab
The \*(Ps generated for
roentgen b75cab
greyscale and bilevel images
roentgen b75cab
uses the
roentgen b75cab
.I image
roentgen b75cab
operator.
roentgen b75cab
When the
roentgen b75cab
.I colorimage
roentgen b75cab
operator is used, \*(Ps code to emulate this operator
roentgen b75cab
on older \*(Ps printers is also generated.
roentgen b75cab
Note that this emulation code can be very slow.
roentgen b75cab
.PP
roentgen b75cab
Color images with associated alpha data are composited over
roentgen b75cab
a white background.
roentgen b75cab
.SH OPTIONS
roentgen b75cab
.TP
roentgen b75cab
.B \-1
roentgen b75cab
Generate \*(Ps Level 1 (the default).
roentgen b75cab
.TP
roentgen b75cab
.B \-2
roentgen b75cab
Generate \*(Ps Level 2.
roentgen b75cab
.TP
roentgen b75cab
.B \-3
roentgen b75cab
Generate \*(Ps Level 3. It basically allows one to use the /flateDecode
roentgen b75cab
filter for ZIP compressed TIFF images.
roentgen b75cab
.TP
roentgen b75cab
.B \-a
roentgen b75cab
Generate output for all IFDs (pages) in the input file.
roentgen b75cab
.TP
roentgen b75cab
.B \-b
roentgen b75cab
Specify the bottom margin for the output (in inches). This does not affect
roentgen b75cab
the height of the printed image.
roentgen b75cab
.TP
roentgen b75cab
.B \-c
roentgen b75cab
Center the image in the output. This option only shows an effect if both
roentgen b75cab
the
roentgen b75cab
.B \-w
roentgen b75cab
and the
roentgen b75cab
.B \-h
roentgen b75cab
option are given.
roentgen b75cab
.TP
roentgen b75cab
.B \-d
roentgen b75cab
Set the initial
roentgen b75cab
.SM TIFF
roentgen b75cab
directory to the specified directory number.
roentgen b75cab
(NB: Directories are numbered starting at zero.)
roentgen b75cab
This option is useful for selecting individual pages in a
roentgen b75cab
multi-page (e.g. facsimile) file.
roentgen b75cab
.TP
roentgen b75cab
.B \-e
roentgen b75cab
Force the generation of Encapsulated \*(Ps (implies
roentgen b75cab
.BR \-z ).
roentgen b75cab
.TP
roentgen b75cab
.B \-h
roentgen b75cab
Specify the vertical size of the printed area (in inches).
roentgen b75cab
.TP
roentgen b75cab
.B \-H
roentgen b75cab
Specify the maximum height of image (in inches). Images with larger sizes will
roentgen b75cab
be split in several pages. Option
roentgen b75cab
.B \-L
roentgen b75cab
may be used for specifying size of split images overlapping.
roentgen b75cab
.TP
roentgen b75cab
.B \-W
roentgen b75cab
Specify the maximum width of image (in inches). Images with larger sizes will
roentgen b75cab
be split in several pages. Options
roentgen b75cab
.B \-L
roentgen b75cab
and 
roentgen b75cab
.B \-W
roentgen b75cab
are mutually exclusive.
roentgen b75cab
.B \-i
roentgen b75cab
Enable/disable pixel interpolation.  This option requires a
roentgen b75cab
single numeric value: zero to disable pixel interpolation and
roentgen b75cab
non-zero to enable.  The default is enabled.
roentgen b75cab
.TP
roentgen b75cab
.B \-L
roentgen b75cab
Specify the size of overlapping for split images (in inches). Used in
roentgen b75cab
conjunction with
roentgen b75cab
.B \-H
roentgen b75cab
option and
roentgen b75cab
.B \-W
roentgen b75cab
option.
roentgen b75cab
.TP
roentgen b75cab
.B \-l
roentgen b75cab
Specify the left margin for the output (in inches). This does not affect
roentgen b75cab
the width of the printed image.
roentgen b75cab
.TP
roentgen b75cab
.B \-m
roentgen b75cab
Where possible render using the
roentgen b75cab
.I imagemask
roentgen b75cab
\*(Ps operator instead of the
roentgen b75cab
.I image
roentgen b75cab
operator.  When this option is specified
roentgen b75cab
.I tiff2ps
roentgen b75cab
will use
roentgen b75cab
.I imagemask
roentgen b75cab
for rendering 1 bit deep images.  If this option is not specified
roentgen b75cab
or if the image depth is greater than 1 then the
roentgen b75cab
.I image
roentgen b75cab
operator is used.
roentgen b75cab
.TP
roentgen b75cab
.B \-o
roentgen b75cab
Set the initial
roentgen b75cab
.SM TIFF
roentgen b75cab
directory to the
roentgen b75cab
.SM IFD
roentgen b75cab
at the specified file offset.
roentgen b75cab
This option is useful for selecting thumbnail images and the
roentgen b75cab
like which are hidden using the
roentgen b75cab
.I SubIFD
roentgen b75cab
tag.
roentgen b75cab
.TP
roentgen b75cab
.B \-p
roentgen b75cab
Force the generation of (non-Encapsulated) \*(Ps.
roentgen b75cab
.TP
roentgen b75cab
.B \-r 90|180|270|auto
roentgen b75cab
Rotate image by 90, 180, 270 degrees or auto.  Auto picks the best
roentgen b75cab
fit for the image on the specified paper size (eg portrait
roentgen b75cab
or landscape) if -h or -w is specified. Rotation is in degrees 
roentgen b75cab
counterclockwise. Auto rotates 90 degrees ccw to produce landscape.
roentgen b75cab
.TP
roentgen b75cab
.B \-s
roentgen b75cab
Generate output for a single IFD (page) in the input file.
roentgen b75cab
.TP
roentgen b75cab
.B \-w
roentgen b75cab
Specify the horizontal size of the printed area (in inches).
roentgen b75cab
.TP
roentgen b75cab
.B \-x
roentgen b75cab
Override resolution units specified in the TIFF as centimeters.
roentgen b75cab
.TP
roentgen b75cab
.B \-y
roentgen b75cab
Override resolution units specified in the TIFF as inches.
roentgen b75cab
.TP
roentgen b75cab
.B \-z
roentgen b75cab
When generating \*(Ps Level 2, data is scaled so that it does not
roentgen b75cab
image into the 
roentgen b75cab
.I deadzone
roentgen b75cab
on a page (the outer margin that the printing device is unable to mark).
roentgen b75cab
This option suppresses this behavior.
roentgen b75cab
When \*(Ps Level 1 is generated, data is imaged to the entire printed
roentgen b75cab
page and this option has no affect.
roentgen b75cab
.SH EXAMPLES
roentgen b75cab
The following generates \*(Ps Level 2 for all pages of a facsimile:
roentgen b75cab
.RS
roentgen b75cab
.nf
roentgen b75cab
tiff2ps \-a2 fax.tif | lpr
roentgen b75cab
.fi
roentgen b75cab
.RE
roentgen b75cab
Note also that if you have version 2.6.1 or newer of Ghostscript then you
roentgen b75cab
can efficiently preview facsimile generated with the above command.
roentgen b75cab
.PP
roentgen b75cab
To generate Encapsulated \*(Ps for a the image at directory 2
roentgen b75cab
of an image use:
roentgen b75cab
.RS
roentgen b75cab
.nf
roentgen b75cab
tiff2ps \-d 1 foo.tif
roentgen b75cab
.fi
roentgen b75cab
.RE
roentgen b75cab
(Notice that directories are numbered starting at zero.)
roentgen b75cab
.PP
roentgen b75cab
If you have a long image, it may be split in several pages:
roentgen b75cab
.RS
roentgen b75cab
.nf
roentgen b75cab
tiff2ps \-h11 \-w8.5 \-H14 \-L.5 foo.tif > foo.ps
roentgen b75cab
.fi
roentgen b75cab
.RE
roentgen b75cab
The page size is set to 8.5x11 by
roentgen b75cab
.B \-w
roentgen b75cab
and
roentgen b75cab
.B \-h
roentgen b75cab
options. We will accept a small amount of vertical compression, so
roentgen b75cab
.B \-H
roentgen b75cab
set to 14. Any pages between 11 and 14 inches will be fit onto one page.
roentgen b75cab
Pages longer than 14 inches are cut off at 11 and continued on the next
roentgen b75cab
page. The
roentgen b75cab
.B \-L.5
roentgen b75cab
option says to repeat a half inch on the next page (to improve readability).
roentgen b75cab
.SH BUGS
roentgen b75cab
Because \*(Ps does not support the notion of a colormap,
roentgen b75cab
8-bit palette images produce 24-bit \*(Ps images.
roentgen b75cab
This conversion results in output that is six times
roentgen b75cab
bigger than the original image and which takes a long time
roentgen b75cab
to send to a printer over a serial line.
roentgen b75cab
Matters are even worse for 4-, 2-, and 1-bit palette images.
roentgen b75cab
.PP
roentgen b75cab
Does not handle tiled images when generating \*(Ps Level I output.
roentgen b75cab
.SH "SEE ALSO"
roentgen b75cab
.BR pal2rgb (1),
roentgen b75cab
.BR tiffinfo (1),
roentgen b75cab
.BR tiffcp (1),
roentgen b75cab
.BR tiffgt (1),
roentgen b75cab
.BR tiffmedian (1),
roentgen b75cab
.BR tiff2bw (1),
roentgen b75cab
.BR tiffsv (1),
roentgen b75cab
.BR libtiff (3)
roentgen b75cab
.PP
roentgen b75cab
Libtiff library home page:
roentgen b75cab
.BR http://www.remotesensing.org/libtiff/