PAMTOTGA(1)
π pamtotga, bestie
okay so this is the Pamtotga User Manual page, from the General Commands Manual section β yes the title repeats itself, that's just how man pages are, iconic behavior honestly π«Ά
β¨ NAME β¨
pamtotga β convert a Netpbm image to a TrueVision Targa file
π SYNOPSIS π
pamtotga [-mono|-cmap|-cmap16|-rgb] [-norle] [-name=name [-verhose]
[pamfile]
okay so small print, but important print, no cap:
- every option can be abbreviated to its shortest unique prefix β type less, slay more π
- you can use two hyphens instead of one to designate an option
- and you can use either white space or equals signs between an option name and its value
πΈ DESCRIPTION πΈ
This program is part of Netpbm(1), the whole little family. π§
pamtotga reads a PBM, PGM, PPM, or PAM image as input and spits out a TrueVision Targa file as output. The PAM image may be either a BLACKANDWHITE, GRAYSCALE, RGB, or RGB_ALPHA image.
So you want transparency?? A transparency mask?? Girl, same. To create a TGA image with transparency (i.e. with a transparency mask), use RGB_ALPHA PAM input. Some Netpbm programs that generate images with transparency masks generate them in that format. And if you want another way to create the proper input stream, go look at pamstack(1).
Now, real talk π« β it is unclear that anything except pamtotga knows about TGAs with transparency. The history behind this feature of pamtotga is not clear either. The format pamtotga produces is simply the same as an ordinary RGB TGA image except with a 4th plane added for transparency. The PixelSize field of the TGA header specifies 32 bits instead of 24, and the raster has an extra byte added to each pixel, at the tail end. The value of that byte has the same meaning as in a PAM image with maxval 255.
π OPTIONS π
So on top of the options common to all programs based on libnetpbm (most notably -quiet, see Common Options), pamtotga recognizes the following command line options:
-cmapβ Make the output Targa file use a color map (aka a palette) so the output is smaller. Each color in the color map is 3 bytes, 8 bits each of red, green, and blue β unless the input is black and white or grayscale, in which case each color in the palette is represented by one byte. The input must contain no more than 256 distinct colors and must not contain transparency information. (And before you come for the format: the transparency limitation is not a limitation of the format, it's a limitation ofpamtotga. Implementing a color map that contains transparency information is harder to implement. It's giving "skill issue but we're being honest about it" π)-cmap16β Same as-cmap, except a color map entry for full color input is 5 bits each of red, green, and blue, stored as two bytes (16 bits). The restrictions are the same as for-cmap. This option was new in Netpbm 10.85 (December 2018). β¨-monoβ Make the output Targa file of type 8 bit monochrome. Input must be PBM or PGM or a PAM withBLACKANDWHITEorGRAYSCALEtuple type. See-cmap. You may specify at most one of-mono,-cmap, and-rgb. If you specify neither, the default image type is the most highly constrained compatible type, where monochrome is more constrained than colormapped, which is in turn more constrained than unmapped. (Ranked, bestie. There's a whole hierarchy here. π)-rgbβ Make the output Targa file of type 24 bit unmapped color. See-cmap.-norleβ Do not use run-length encoding in the output Targa file. Run-length encoded files are smaller, but some Targa readers can't read run-length encoded files. So like, choose your fighter. π€·-name=nameβ This is the value for the image ID stated in the header of the TGA output file.pamtotgatruncates it as necessary to meet TGA standards. By default,pamtotgauses the input file name argument, up to the first period (or the whole thing if there is no period). It truncates it as necessary to meet TGA standards. And if you specify (or default to) Standard Input,pamtotgaomits the image ID from the TGA header. π«Ά-verboseβ This causespamtotgato issue messages about the conversion process. (Narrator voice, but make it TGA. π₯)
π SEE ALSO π
tgatoppm(1), pnmquant(1), pamstack(1), pam(1), pnm(1)
π HISTORY π
so the lore is real:
This program was called ppmtotga until Netpbm 10.6 (July 2002). And that was always a misnomer, though, because a PPM class program would not be able to tell the difference between PGM and PPM input (it would all look like PPM), and thus could not choose the output Targa image type based on the type of the input. Netpbm 10.6 also added the ability to handle a transparency channel, so it became a PAM class program. glow up fr π
In Netpbm 10.15 (April 2003), the program became the first in the Netpbm package to recognize a transparency channel in a PAM. It recognized tuple type "RGBA". But when this kind of PAM image was later added to the PAM specification, it was specified with tuple type "RGB_ALPHA". So in Netpbm 10.26 (January 2005), pamtotga changed to recognize "RGB_ALPHA" instead of "RGBA". Character development. π±
π AUTHOR π
Copyright (C) 1989, 1991 by Mark Shand and Jef Poskanzer.
π¦ 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/pamtotga.html
ok that's the whole page, you're welcome, go make some TGAs π
kisses, this was the netpbm documentation, dated 06 November 2018, and the page calls itself the Pamtotga User Manual(1). slay, periodt. πβ¨
π¦ where this page comes from
- debian bookworm: netpbm 2:11.01.00-2 Β· MIT
- debian trixie: netpbm 2:11.10.02-1 Β· MIT
- ubuntu noble: netpbm 2:11.05.02-1.1build1 Β· MIT
- ubuntu resolute: netpbm 2:11.10.02-1build1 Β· MIT
- ubuntu stonking: netpbm 2:11.13.03+ds-2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms