LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

rasttopnm

Convert Sun raster images to PNM format

TLDR

Convert a Sun raster file to PNM on stdout
$ rasttopnm [input.ras] > [output.pnm]
copy
Read from stdin and write PNM on stdout
$ cat [input.ras] | rasttopnm > [output.pnm]
copy
Output the index plane of a colormapped raster (debugging)
$ rasttopnm -index [input.ras] > [output.pgm]
copy
Convert and pipe to PNG
$ rasttopnm [input.ras] | pnmtopng > [output.png]
copy

SYNOPSIS

rasttopnm [-index] [rastfile]

DESCRIPTION

rasttopnm converts Sun Rasterfile images (.ras) to Portable Anymap (PNM) format, automatically selecting PBM, PGM, or PPM output based on the input image's color depth and colormap. Sun Rasterfile was the native image format on SunOS and Solaris systems and is commonly produced by older X11 tools.Output goes to standard output. Part of the Netpbm toolkit.

PARAMETERS

rastfile

Sun Rasterfile (.ras) input. Reads from stdin if omitted.
-index
For colormapped rasters, output the raw color-index plane as PGM instead of dereferencing it through the colormap to produce PPM. Mainly useful for inspecting the underlying data.

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

Some less-common Rasterfile encodings (e.g. RTBYTEENCODED RLE with unusual colormaps) may not be supported on every Netpbm build. The converter chooses the narrowest PNM subtype that can losslessly represent the input.

SEE ALSO

pnmtorast(1), xwdtopnm(1), pnm(5)

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