gemtoppm
SYNOPSIS
gemtoppm [gemfile]
DESCRIPTION
gemtoppm is a command-line utility from the Netpbm graphics toolkit that converts GEM Raster (IMG) bitmap files to Portable Pixmap (PPM) format.
GEM, developed by Digital Research in the 1980s for their GEM graphical environment, was widely used for raster images in desktop publishing software like Ventura Publisher and GEM Draw. These files store monochrome or color bitmaps.
The tool reads a single GEM file (or stdin) and outputs raw PPM (P6 binary) to stdout. It handles both black-and-white and color images, mapping GEM colors to RGB PPM values. Multi-image GEM files produce multi-image PPM streams, allowing pipelining with tools like pnmcut(1).
Simple usage: gemtoppm input.gem > output.ppm. No options or flags exist, emphasizing its role as a basic format converter. It's ideal for legacy image processing in scripts or batch conversions.
Output PPM files are maximally portable and can be further manipulated with other Netpbm utilities.
CAVEATS
Supports only GEM Raster (IMG) bitmaps, not GEM metafiles or vector formats.
Handles specific GEM versions (e.g., Ventura Publisher); exotic variants may fail.
Always outputs color PPM, even for mono images (maxval 1 maps to grayscale).
INPUT HANDLING
Reads from stdin if no gemfile given. Ignores GEM headers beyond raster data.
MULTI-IMAGE SUPPORT
Outputs PPM stream with multiple images if GEM file contains them; use pnmfile(1) to inspect.
HISTORY
Added to Netpbm in the early 1990s by Jef Poskanzer. Based on public-domain GEM decoder code. Netpbm (1988-) maintains it for legacy support; last major update pre-2000.


