# pamtotga

Updated: 21 July 2002
Index

## NAME

pamtotga - convert a Netpbm image to a TrueVision Targa file

## SYNOPSIS

pamtotga [-mono|-cmap|-rgb] [-norle] [pamfile]

All options can be abbreviated to their shortest unique prefix. You may use two hyphens instead of one to designate an option. You may use either white space or equals signs between an option name and its value.

## DESCRIPTION

Reads a PBM, PGM, PPM, or PAM image as input. Produces a TrueVision Targa file as output. The PAM image may be either a BLACKANDWHITE, GRAYSCALE, RGB, or RGBA image.

To create a TGA image with transparency (i.e. with an alpha mask), use RGBA PAM input. Some Netpbm programs that generate images with alpha masks generate them in that format. For another way to create the proper input stream, see pamstack.

## OPTIONS

-cmap
  Make output Targa file of type 24 bit colormapped. Input must contain no more than 256 distinct colors.
-mono
  Make output Targa file of type 8 bit monochrome. Input must be PBM or PGM or a PAM with BLACKANDWHITE or GRAYSCALE tuple 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 is used, where monochrome is more constrained than colormapped which is in turn more constrained than unmapped.

-rgb
  Make 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.

## SEE ALSO

tgatoppm, pnmquant, pamstack, pam pnm

## HISTORY

This program was called ppmtotga until Netpbm 10.6 (July 2002). 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 an alpha channel, to it became a PAM class program.

## AUTHOR

Copyright (C) 1989, 1991 by Mark Shand and Jef Poskanzer.

## Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
BUGS
SEE ALSO
AUTHOR