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