LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

bmptoppm

Convert BMP images to PPM format

TLDR

Convert a BMP image to PPM format
$ bmptoppm [image.bmp] > [output.ppm]
copy
Convert from stdin
$ cat [image.bmp] | bmptoppm > [output.ppm]
copy
Convert BMP to JPEG via pipe
$ bmptoppm [image.bmp] | pnmtojpeg > [output.jpg]
copy

SYNOPSIS

bmptoppm [bmpfile]

DESCRIPTION

bmptoppm reads a Microsoft Windows or OS/2 BMP file as input and produces a PPM (Portable PixMap) color image as output. This is part of the Netpbm package.This command was replaced in Netpbm 9.25 (March 2002) by bmptopnm, which automatically determines the appropriate output format (PBM, PGM, or PPM) based on the input image characteristics. bmptoppm is retained only for backward compatibility and takes no options of its own.Input can be from a file or standard input; output is to standard output.

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

For grayscale BMP images, consider using bmptopnm instead, which will produce more appropriate PGM output. This command always outputs PPM regardless of the input color depth.

SEE ALSO

RESOURCES

Copied to clipboard
Kai