atktopbm
Convert Atari KoalaPainter image to Portable BitMap
TLDR
Convert a Andrew Toolkit raster object to a PBM image
SYNOPSIS
atktopbm [degasfile]
PARAMETERS
[degasfile]
Input Atari Degas .pi1, .pi2, or .pi3 file; reads stdin if omitted.
DESCRIPTION
atktopbm is a utility from the Netpbm graphics package that converts classic Atari ST Degas image files (.pi1, .pi2, .pi3) to Portable Bitmap (PBM) format.
These formats originated from the Degas paint program on Atari computers:
- PI1: 320x200 pixels, 16 colors (low resolution).
- PI2: 640x200 pixels, 4 colors (medium resolution).
- PI3: 640x400 pixels, 16 colors (high resolution).
The command reads a single input file (or stdin) containing the packed pixel data and fixed 16-color palette (4 colors for PI2 map to first 4 of palette). It outputs a monochrome PBM image to stdout, using Floyd-Steinberg error diffusion dithering to approximate the original colors in grayscale. This preserves visual detail despite the loss of color information.
Ideal for archiving or processing vintage Atari artwork in modern workflows, often piped to other Netpbm tools like pnmscale or ppmtopng. No color output; for that, use tools like xwdtopnm if source allows.
CAVEATS
Produces only monochrome PBM (dithers colors to B&W); does not handle compressed Degas Elite formats or non-standard variants. Fixed palette assumed; may not match custom Atari palettes perfectly.
Input must be exactly one valid image.
DITHERING DETAILS
Maps pixel indices to intensities via standard Degas 16-color palette, then applies Floyd-Steinberg diffusion for high-quality B&W approximation.
EXAMPLE USAGE
atktopbm image.pi1 | pnmtopng > image.png
Converts PI1 to PNG via PBM.
HISTORY
Developed by Jef Poskanzer as part of the original PBMPLUS toolkit (1988-1991), later integrated into Netpbm (1990s+). Superseded separate pi1topbm and pi3topbm tools for unified Atari Degas support. Widely used for retrocomputing image conversion; maintained in Netpbm releases.


