LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

xpmtoppm

Convert XPM pixmaps to PPM format

TLDR

Convert an XPM image to PPM
$ xpmtoppm [input.xpm] > [output.ppm]
copy
Read from standard input
$ cat [input.xpm] | xpmtoppm > [output.ppm]
copy
Extract the alpha (transparency) channel to a separate PBM file
$ xpmtoppm --alphaout=[alpha.pbm] [input.xpm] > [output.ppm]
copy

SYNOPSIS

xpmtoppm [options] [file]

DESCRIPTION

xpmtoppm reads an X11 pixmap (XPM version 1 or 3) as input and produces a PPM image as output. It handles transparency and color-mapped images. Part of the Netpbm toolkit.

PARAMETERS

--alphaout=file

Write the transparency mask to the specified PBM file. If the input has no transparency information, the file contains all white (opaque) values. Specify `-` to write the alpha output to standard output instead of the image.

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

Only a limited set of XPM version 3 features are supported; many valid XPM images may be rejected. Input lines longer than 8K characters cause an error.

SEE ALSO

ppmtoxpm(1), xbmtopbm(1), netpbm(1)

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