LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

ppmtobmp

Convert PPM images to BMP format

TLDR

Convert PPM to BMP
$ ppmtobmp [input.ppm] > [output.bmp]
copy
Create Windows BMP
$ ppmtobmp -windows [input.ppm] > [output.bmp]
copy
Create OS/2 BMP
$ ppmtobmp -os2 [input.ppm] > [output.bmp]
copy
Force 8 bits per pixel
$ ppmtobmp -bpp 8 [input.ppm] > [output.bmp]
copy

SYNOPSIS

ppmtobmp [-windows|-os2] [-bpp n] [-mapfile file] [ppmfile]

DESCRIPTION

ppmtobmp converts PPM images to BMP (Windows/OS2 bitmap) format. Part of Netpbm toolkit for image format conversion.

PARAMETERS

-windows

Produce a Microsoft Windows BMP file. This is the default (since August 2000).
-os2
Produce an OS/2 BMP file.
-bpp bits
Bits per pixel in the output: 1, 4, 8, or 24. By default ppmtobmp picks the smallest value that can represent all colors in the input.
-mapfile file
Use the given file as the BMP palette (colormap) instead of computing one automatically. Useful when you need specific palette index values.

SEE ALSO

Copied to clipboard
Kai