1Giftopnm User Manual(0)                                Giftopnm User Manual(0)
2
3
4

NAME

6       giftopnm - convert a GIF file into a PNM image
7
8

SYNOPSIS

10       giftopnm    [--alphaout={alpha-filename,-}]    [-verbose]   [-comments]
11       [-image={N,all}] [-repair] [-quitearly] [GIFfile]
12
13       Minimum unique abbreviation of option is acceptable.  You may use  dou‐
14       ble  hyphens  instead  of single hyphen to denote options.  You may use
15       white space in place of the equals sign to separate an option name from
16       its value.
17
18

DESCRIPTION

20       This program is part of Netpbm(1).
21
22       This  is  a  graphics  format  converter from the GIF format to the PNM
23       (i.e. PBM, PGM, or PPM) format.
24
25       If the image contains only black and maximally bright white, the output
26       is  PBM.   If  the  image contains more than those two colors, but only
27       grays, the output is PGM.  If the image contains other colors, the out‐
28       put is PPM.
29
30        A  GIF  image  contains  rectangular  pixels.   They all have the same
31       aspect ratio, but may not be square (it's actually  quite  unusual  for
32       them  not  to  be square, but it could happen).  The pixels of a Netpbm
33       image are always square.  Because of the engineering complexity  to  do
34       otherwise,  giftopnm  converts a GIF image to a Netpbm image pixel-for-
35       pixel.  This means if the GIF pixels are not square, the Netpbm  output
36       image  has  the  wrong  aspect ratio.  In this case, giftopnm issues an
37       informational message telling you to run pamscale to correct  the  out‐
38       put.
39
40

OPTIONS

42       --alphaout=alpha-filename
43              giftopnm   creates  a PGM (portable graymap) file containing the
44              alpha channel values in the input image.   If  the  input  image
45              doesn't  contain  an alpha channel, the alpha-filename file con‐
46              tains all zero (transparent) alpha values.  If you don't specify
47              --alphaout, giftopnm does not generate an alpha file, and if the
48              input image has an alpha channel, giftopnm simply discards it.
49
50              If you specify - as the filename, giftopnm writes the alpha out‐
51              put to Standard Output and discards the image.
52
53              See pamcomp(1)foronewaytouse the alpha output file.
54
55
56       -verbose
57              Produce verbose output about the GIF file input.
58
59
60       -comments
61              Only output GIF89 comment fields.
62
63
64       -image={N,all}
65              This option identifies which image from the GIF stream you want.
66              You can select either one image or all the  images.   Select  al
67              the  images  with  all.   Select  one  image  by  specifying its
68              sequence number in the stream: 1, 2, 3, etc.
69
70              The default is just Image 1.
71
72              A GIF stream normally contains only one image, so you don't need
73              this  option.   But  some streams, including animated GIFs, have
74              multiple images.
75
76              When you select multiple GIF images, the output is a PNM  stream
77              with multiple images.
78
79              If  you specify a single image, giftopnm must read and partially
80              validate the images before that in the stream.  It  may  or  may
81              not do the same for the images after it; see -quitearly.
82
83              The  all  value  was added in Netpbm 10.16 (June 2003).  Earlier
84              giftopnm can extract only one image.
85
86
87       -repair
88              This option makes giftopnm try to salvage what it  can  from  an
89              invalid GIF input.
90
91              In  particular,  when  giftopnm  detects  that  the GIF input is
92              invalid so that it is impossible to determine  what  the  pixels
93              are intended to be, it produces a single arbitrary color for all
94              further pixels in the image.  giftopnm processes the image  from
95              top  to bottom, left to right, so this means the bottommost pix‐
96              els will be this padding.
97
98              giftopnm issues warning messages when it salvages  an  image  in
99              this way.
100
101              Without  this option, giftopnm fails when it detects invalid GIF
102              input.  Any output it produces is arbitrary,  and  typically  is
103              not a valid PNM image.
104
105              It  is  fairly  common for an image to be corrupted such that is
106              started off as a valid GIF, but had the end of the file cut off.
107              An interrupted network transfer tends to do this.  In this case,
108              giftopnm's salvage operation will produce a valid PNM  image  of
109              the proper dimensions, but with a single arbitrary color for the
110              pixels that were left out of the file.
111
112              This option was new in Netpbm 10.38 (March  2007).   From  10.32
113              through  10.37,  giftopnm always fails if it detects invalid GIF
114              input.  Before 10.32, it succeeds in the  case  of  a  truncated
115              image,  and  replaces  the missing pixels with arbitrary colors,
116              not necessarily all the  same  (The  pre-10.32  behavior  wasn't
117              actually intended by the design).
118
119
120
121       -quitearly
122              This  option  makes giftopnm stop reading its input file as soon
123              as it has converted and output the images from  the  input  that
124              you  requested.  By default, giftopnm reads until the end of the
125              GIF stream, ignoring any data after the images you requested.
126
127              Two reasons not to use this option:
128
129
130       ·      The input file is a pipe and the process that  is  filling  that
131              pipe expects the pipe to take the entire stream and will fail or
132              get stuck if it doesn't.
133
134
135       ·      You want to validate the entire GIF stream.
136
137
138
139              Two reasons to use this option:
140
141
142
143       ·      It saves the time and other resources to read  the  end  of  the
144              stream.
145
146       ·      There  are  errors  in  the end of the stream that make giftopnm
147              fail.
148
149
150              This option has no effect if you also specify -image=all
151
152              This option was new in Netpbm 10.35 (August 2006).  Before that,
153              giftopnm always reads the entire stream.
154
155
156
157

RESTRICTIONS

159       This  does  not  correctly handle the Plain Text Extension of the GIF89
160       standard, since I did not have any example input files containing them.
161
162

SEE ALSO

164       pamtogif(1), ppmcolormask(1), pamcomp(1),  http://www.lcdf.org/gifsicle
165http://www.lcdf.org/gifsicle⟩ , ppm(1).
166
167

AUTHOR

169       Copyright (c) 1993 by David Koblas (koblas@netcom.com)
170
171

LICENSE

173       As  a  historical  note, for a long time if you used giftopnm, you were
174       using a patent on the LZW compression method which was owned by Unisys,
175       and in all probability you did not have a license from Unisys to do so.
176       Unisys typically asked $5000 for a  license  for  trivial  use  of  the
177       patent.   Unisys  never  enforced the patent against trivial users, and
178       made statements that it is much less concerned about people  using  the
179       patent for decompression (which is what giftopnm does than for compres‐
180       sion.  The patent expired in 2003.
181
182       Rumor has it that IBM also owns a patent covering giftopnm.
183
184       A replacement for the GIF format that has  never  required  any  patent
185       license to use is the PNG format.
186
187
188
189netpbm documentation            29 January 2007        Giftopnm User Manual(0)
Impressum