PPMTOGIF(1)

๐Ÿ’– NAME ๐Ÿ’–

ppmtogif โ€” bestie, it's been replaced by pamtogif, and that's pretty much the headline ๐Ÿ’€


โœจ DESCRIPTION โœจ

Okay so first things first: this program is part of Netpbm(1).

ppmtogif got replaced in Netpbm 10.37 (December 2006) by pamtogif(1). Like, retired. Glow-up complete, old version went home.

pamtogif is mostly backward compatible with ppmtogif. But "mostly" is doing a lot of heavy lifting in that sentence so let's get into it ๐Ÿ‘‘

One way pamtogif is not backward compatible with ppmtogif is transparency (alpha). With ppmtogif, you supply the transparency as a separate pseudo-PGM image and use the -alpha option. With pamtogif? You supply an input image that has the transparency integrated into it, and there's just... no -alpha option. Periodt.

Another, more obscure way pamtogif is not backward compatible is the -map option ๐Ÿซฃ You use this option to specify what colors you want in the GIF image, because a GIF image can have at most 256 colors and your input image might have more than that. In pamtogif, the map image must be the same depth as the input image, but in ppmtogif it need not be.

ppmtogif still exists as a separate program for backward compatibility, but it runs pamtogif to do the essential work, fr fr. The compatibility ppmtogif interprets an -alpha option by reading the transparency image and combining it with the input image, then feeding pamtogif the combined image it expects. If you use the -map option, the compatibility ppmtogif also uses pnmremap on your input to make it the same depth as your map file. Other than that, the compatibility ppmtogif just passes input and options directly to pamtogif. No extra drama.

You should not make any new use of ppmtogif and if you modify an existing use, you should upgrade to pamtogif. But note that if you write a program that might have to be used with old Netpbm, ppmtogif is the only way to do that. The old-Netpbm-compatibility niche is literally its whole personality at this point.

Unless you use the -alpha or -map option, you can simply change the name of the program. If you use -alpha, here is how to upgrade:

$ ppmtogif -alpha=myalpha.pgm myinput.ppm >myoutput.gif

becomes

$ pamstack -tupletype=RGB_ALPHA myinput.ppm myalpha.pgm |  \
    pamtogif >myoutput.gif

๐Ÿงš Original Ppmtogif ๐Ÿงš

If you are using Netpbm before 10.37, pamtogif doesn't exist, so you use ppmtogif. Cute, retro, vintage era ๐ŸŽ€ You can use the pamtogif manual for ppmtogif, with the following exceptions.

  • The current documentation of pamtogif documents all versions of that program. Use the information for Version 10.37 only.
  • ppmtogif before Netpbm 10.31 does not accept PAM input at all.
  • ppmtogif does not accept PAM input with transparency information in it. Instead, ppmtogif has an -alpha option.
  • The syntax of the option is -alpha=pgmfile. ppmtogif treats the contents of the named PGM file the same as pamtogif treats the alpha plane of a PAM. The PGM image must have the same dimensions as the input file. But unlike the PAM case, the alpha image need not have the same maxval as the input. ppmtogif interprets the alpha file using the alpha file's maxval. (Alpha file's maxval, not the input's โ€” iykyk ๐Ÿ’…)
  • You cannot specify both -transparent and -alpha. Pick a lane bestie, it's giving mutually exclusive.

๐Ÿ“œ DOCUMENT SOURCE ๐Ÿ“œ

This manual page was generated by the Netpbm tool makeman from HTML source. The master documentation is at

http://netpbm.sourceforge.net/doc/ppmtogif.html

And that's the whole page pookie ๐Ÿฆ‹ โ€” this one's netpbm documentation, Ppmtogif User Manual(1), straight from the General Commands Manual section of the man pages. No date on the label, just vibes and a version number ๐Ÿ’œ Go use pamtogif instead, you'll thank me later โœจ

๐Ÿ“ฆ where this page comes from