Debian Codegraph @

upstream/fedora-44/man1/ppmtogif.1

raw
1 \
2 .\" This man page was generated by the Netpbm tool 'makeman' from HTML source.
3 .\" Do not hand-hack it! If you have bug fixes or improvements, please find
4 .\" the corresponding HTML page on the Netpbm website, generate a patch
5 .\" against that, and send it to the Netpbm maintainer.
6 .TH "Ppmtogif User Manual" 0 "" "netpbm documentation"
7
8 .SH NAME
9 .PP
10 ppmtogif - replaced by pamtogif
11 .PP
12 This program is part of
13 .BR "Netpbm" (1)\c
14 \&.
15
16 .SH SYNOPSIS
17 .PP
18 \fBppmtogif\fP was replaced in Netpbm 10.37 (December 2006) by
19 .BR "pamtogif" (1)\c
20 \&.
21 .PP
22 \fBpamtogif\fP is mostly backward compatible with \fBppmtogif\fP.
23
24 .SH DESCRIPTION
25 .PP
26 One way \fBpamtogif\fP is not backward compatible with \fBppmtogif\fP
27 is that to specify a transparency (alpha) mask with \fBppmtogif\fP, you
28 supply the transparency as a separate pseudo-PGM image and use the
29 \fB-alpha\fP option, whereas with \fBpamtogif\fP, you supply an input
30 image that has the transparency integrated into it, and there is no
31 \fB-alpha\fP option.
32 .PP
33 Another more obscure way \fBpamtogif\fP is not backward compatible is
34 the \fB-map\fP option. You use this option to specify what colors you want
35 in the GIF image, because a GIF image can have at most 256 colors and your
36 input image might have more than that. In \fBpamtogif\fP, the map image
37 must be the same depth as the input image, but in \fBppmtogif\fP it need
38 not.
39 .PP
40 \fBppmtogif\fP still exists as a separate program for backward
41 compatibility, but it runs \fBpamtogif\fP to do the essential work. The
42 compatibility \fBppmtogif\fP interprets an \fB-alpha\fP option by reading
43 the transparency image and combining it with the input image, then feeding
44 \fBpamtogif\fP the combined image it expects. If you use the \fB-map\fP
45 option, the compatibility \fBppmtogif\fP also uses \fBpnmremap\fP on your
46 input to make it the same depth as your map file. Other than that, the
47 compatibility \fBppmtogif\fP just passes input and options directly to
48 \fBpamtogif\fP.
49 .PP
50 You should not make any new use of \fBppmtogif\fP and if you modify an
51 existing use, you should upgrade to \fBpamtogif\fP. But note that if you
52 write a program that might have to be used with old Netpbm, \fBppmtogif\fP is
53 the only way to do that.
54 .PP
55 Unless you use the \fB-alpha\fP or \fB-map\fP option, you can simply
56 change the name of the program. If you use \fB-alpha\fP, here is how to
57 upgrade:
58
59 .nf
60 \f(CW
61 $ ppmtogif -alpha=myalpha.pgm myinput.ppm >myoutput.gif
62 \fP
63
64 .fi
65
66 becomes
67
68 .nf
69 \f(CW
70 $ pamstack -tupletype=RGB_ALPHA myinput.ppm myalpha.pgm | \e
71 pamtogif >myoutput.gif
72 \fP
73
74 .fi
75
76
77 .SH Original Ppmtogif
78 .PP
79 If you are using Netpbm before 10.37, \fBpamtogif\fP doesn't exist,
80 so you use \fBppmtogif\fP. You can use the \fBpamtogif\fP manual
81 for \fBppmtogif\fP, with the following exceptions.
82 .PP
83 The current documentation of \fBpamtogif\fP documents all versions
84 of that program. Use the information for Version 10.37 only.
85 .PP
86 \fBppmtogif\fP before Netpbm 10.31 does not accept PAM input at all.
87 .PP
88 \fBppmtogif\fP does not accept PAM input with transparency information
89 in it. Instead, \fBppmtogif\fP has an \fB-alpha\fP option.
90 .PP
91 The syntax of the option is \fB-alpha=\fP\fIpgmfile\fP.
92 \fBppmtogif\fP treats the contents of the named PGM file the same as
93 \fBpamtogif\fP treats the alpha plane of a PAM. The PGM image must
94 have the same dimensions as the input file. But unlike the PAM case,
95 the alpha image need not have the same maxval as the input.
96 \fBppmtogif\fP interprets the alpha file using the alpha file's
97 maxval.
98 .PP
99 You cannot specify both \fB-transparent\fP and \fB-alpha\fP.
100 .SH DOCUMENT SOURCE
101 This manual page was generated by the Netpbm tool 'makeman' from HTML
102 source. The master documentation is at
103 .IP
104 .B http://netpbm.sourceforge.net/doc/ppmtogif.html
105 .PP