Penguin
Blame: pnmtotiff(1)
EditPageHistoryDiffInfoLikePages
Annotated edit history of pnmtotiff(1) version 2, including all changes. View license author blame.
Rev Author # Line
1 perry 1 pnmtotiff
2 !!!pnmtotiff
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 OPTIONS
7 NOTES
8 SEE ALSO
9 AUTHOR
10 ----
11 !!NAME
12
13
14 pnmtotiff - convert a PNM image to a TIFF file
15 !!SYNOPSIS
16
17
18 __pnmtotiff__
19 [[__-none__|__-packbits__|__-lzw__|__-g3__|__-g4__]
20 [[__-2d__] [[__-fill__] [[__-predictor__ ''n'']
21 [[__-msb2lsb__|__-lsb2msb__] [[__-rowsperstrip__
22 ''n''] [[__-minisblack__] [[''pnmfile'']
23
24
25 Minimum unambiguous abbreviations of options are
26 acceptable.
27 !!DESCRIPTION
28
29
30 Reads a PNM image as input. Produces a TIFF file as
31 output.
32
33
34 The output goes to Standard Output, which must be a seekable
35 file. That means no pipes, but any regular file should
36 work.
37 !!OPTIONS
38
39
40 By default, __pnmtotiff__ creates a TIFF file with no
41 compression. This is your best bet most of the time. If you
42 want to try another compression scheme or tweak some of the
43 other even more obscure output options, there are a number
44 of flags to play with.
45
46
47 Actually, the best default would be to use LZW compression,
48 which is what __pnmtotiff__ used to do by default.
49 However, the Tiff library no longer does LZW compression due
50 to concerns with violating Unisys's patent on LZW
51 compression.
52
53
54 The __-none__, __-packbits__, __-lzw__, __-g3__,
55 and __-g4__ options are used to override the default and
56 set the compression scheme used in creating the output file.
57 The CCITT Group 3 and Group 4 compression algorithms can
58 only be used with bilevel data. __-lzw__ doesn't really
59 work because the Tiff library doesn't do LZW compression. It
60 used to, but its developers removed the function out of
61 concern about violating Unisys's patent. This option remains
62 in case you use a Tiff library that cooperates, now or in
63 the future. The __-2d__ and __-fill__ options are
64 meaningful only with Group 3 compression: __-2d__
65 requests 2-dimensional encoding, while __-fill__ requests
66 that each encoded scanline be zero-filled to a byte boundry.
67 The __-predictor__ option is only meaningful with LZW
68 compression: a predictor value of 2 causes each scanline of
69 the output image to undergo horizontal differencing before
70 it is encoded; a value of 1 forces each scanline to be
71 encoded without differencing.
72
73
74 By default, __pnmtotiff__ creates a TIFF file with
75 msb-to-lsb fill order. The __-msb2lsb__ and
76 __-lsb2msb__ options are used to override the default and
77 set the fill order used in creating the file.
78
79
80 The fill order is the order in which pixels are packed into
81 a byte in the Tiff raster, in the case that there are
82 multiple pixels per byte. msb-to-lsb means that the leftmost
83 columns go into the most significant bits of the byte in the
84 Tiff image. However, there is considerable confusion about
85 the meaning of fill order. Some believe it means whether 16
86 bit sample values in the Tiff image are little-endian or
87 big-endian. This is totally erroneous (The endianness of
88 integers in a Tiff image is designated by the image's magic
2 perry 89 number). However, !ImageMagick and Netpbm both have been
1 perry 90 known to implement that interpretation.
91 2001.09.06.
92
93
94 If the image does not have sub-byte pixels, these options
95 have no effect other than to set the value of the FILLORDER
96 tag in the Tiff image (which may be useful for those
97 programs that misinterpret the tag with reference to 16 bit
98 samples).
99
100
101 The __-rowsperstrip__ option can be used to set the
102 number of rows (scanlines) in each strip of data in the
103 output file. By default, the output file has the number of
104 rows per strip set to a value that will ensure each strip is
105 no more than 8 kilobytes long.
106
107
108 The __-minisblack__ option forces the output image to
109 have a
110 __
111
112
113 Without the __-minisblack__ option, __pnmtotiff__
114 follows the standard. This usually results in better
115 compression and is generally preferred for bilevel
116 coding.
117
118
119 Before February 2001, __pnmtotiff__ always produced
120 __pnmtotiff__ sets the photometric interpretation tag in
121 the TIFF output according to which photometric is actually
122 used.
123 !!NOTES
124
125
126 There are myriad variations of the TIFF format, and this
127 program generates only a few of them. __pnmtotiff__
128 creates a grayscale TIFF file if its input is a PBM
129 (monochrome) or PGM (grayscale) file. __pnmtotiff__ also
130 creates a grayscale file if it input is PPM (color), but
131 there is only one color in the image. If the input is a PPM
132 (color) file and there are 256 colors or fewer, but more
133 than 1, __pnmtotiff__ generates a color palette TIFF
134 file. If there are more colors than that, __pnmtotiff__
135 generates an RGB (not RGBA) single plane TIFF file. Use
136 __pnmtotiffcmyk__ to generate the
137 cyan-magenta-yellow-black ink color separation TIFF
138 format.
139
140
141 The number of bits per sample in the TIFF output is
142 determined by the maxval of the PNM input. If the maxval is
143 less than 256, the bits per sample in the output is the
144 smallest number that can encode the maxval. If the maxval is
145 greater than or equal to 256, there are 16 bits per sample
146 in the output.
147 !!SEE ALSO
148
149
150 tifftopnm(1), pnmtotiffcmyk(1),
151 pnmdepth(1), pnm(5)
152 !!AUTHOR
153
154
155 Derived by Jef Poskanzer from ras2tiff.c, which is Copyright
156 (c) 1990 by Sun Microsystems, Inc. Author: Patrick J.
157 Naughton (naughton@wind.sun.com).
158 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.