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

RESTRICTIONS

164       This  does  not  correctly handle the Plain Text Extension of the GIF89
165       standard, since I did not have any example input files containing them.
166
167

SEE ALSO

169       pamtogif(1), ppmcolormask(1), pamcomp(1),  http://www.lcdf.org/gifsicle
170http://www.lcdf.org/gifsicle⟩ , ppm(1).
171
172

AUTHOR

174       Copyright (c) 1993 by David Koblas (koblas@netcom.com)
175
176

LICENSE

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