LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pngtopam

Convert PNG images to PAM format

TLDR

Convert PNG to PAM
$ pngtopam [input.png] > [output.pam]
copy
Convert with alpha channel
$ pngtopam -alpha [input.png] > [output.pam]
copy

SYNOPSIS

pngtopam [options] [file]

DESCRIPTION

pngtopam converts a PNG image to a PAM (Portable Arbitrary Map) image. Part of the Netpbm toolkit, it preserves transparency when -alphapam is specified. If the input has no transparency, the output is typically an RGB or grayscale PAM.

PARAMETERS

-alphapam

Output a PAM with tuple type depending on the PNG (supports transparency).
-alpha
Extract only the alpha channel as a PGM-style PAM.
-mix
Composite the image against a background color when transparency is present.
-background color
Specify the background color used with -mix (e.g., "rgb:FF/FF/FF" or a color name).
-gamma value
Set the gamma value used for display correction.
-text
Emit any tEXt chunks from the PNG to stderr.
-verbose
Print information about the conversion to stderr.

INSTALL

sudo apt install netpbm
copy
sudo dnf install netpbm
copy
sudo pacman -S netpbm
copy
sudo apk add netpbm
copy
sudo zypper install netpbm
copy
brew install netpbm
copy
nix profile install nixpkgs#netpbm
copy

CAVEATS

Reads from standard input if no file is given. Without -alphapam or -alpha, transparency information may be lost. Replaces older pngtopnm for images needing alpha channel support.

HISTORY

Part of the Netpbm package, which descends from Jef Poskanzer's pbmplus from the late 1980s. PAM was introduced in Netpbm 10.x to unify PBM/PGM/PPM/PAM handling.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid