LinuxCommandLibrary

macptopbm

Convert Macintosh MacPaint files to portable bitmaps

TLDR

Convert a MacPaint file into a PGM image

$ macptopbm [path/to/file.macp] > [path/to/output.pbm]
copy

Skip over n bytes when reading the file
$ macptopbm [[-e|-extraskip]] [n] > [path/to/output.pbm]
copy

Suppress all informational messages
$ macptopbm [[-q|-quiet]] > [path/to/output.pbm]
copy

Display version
$ macptopbm [[-v|-version]]
copy

SYNOPSIS

macptopbm [macpaintfile]

DESCRIPTION

The macptopbm command is a utility within the Netpbm image manipulation toolkit. Its primary function is to convert image files created in the classic MacPaint format into the Portable Bitmap (PBM) format. MacPaint files typically store 1-bit (black and white) images, and PBM is a simple, plain-text or raw black and white image format, making it a suitable target for direct conversion. This tool is valuable for processing legacy MacPaint images, allowing them to be viewed or further processed using other Netpbm utilities or compatible image software. By default, macptopbm reads the MacPaint file from standard input if no filename is specified and writes the resulting PBM data to standard output, adhering to the Unix philosophy of pipeline processing.

CAVEATS

The MacPaint format is an older, 1-bit monochrome image format; thus, macptopbm is limited to converting such files. It does not handle color or grayscale information, as MacPaint intrinsically didn't support it directly in its native format. As an older format, MacPaint files are less common today, making this command somewhat specialized. The command expects a valid MacPaint file structure and will produce errors for malformed or non-MacPaint input.

STANDARD INPUT/OUTPUT

By default, if macpaintfile is not specified, macptopbm reads the MacPaint image data from standard input. The resulting PBM image data is always written to standard output. This behavior allows for easy piping of data, for example, from a tool that extracts MacPaint data from an archive, directly into macptopbm, and then piping its output into another Netpbm utility or for redirection to a file.

HISTORY

macptopbm is part of the Netpbm project, which began as PBMplus in the late 1980s and early 1990s. During this period, converting between various proprietary and emerging image formats was a common challenge. The inclusion of a MacPaint converter reflects the prevalence of Apple Macintosh systems and their proprietary image formats at the time. Its development ensured interoperability for images created on these early graphical computing platforms with other Unix-based systems and image processing tools, solidifying Netpbm's role as a comprehensive toolkit for image conversion.

SEE ALSO

pbm(5), netpbm(1), anytopnm(1), giftopnm(1), jpegtopnm(1), pngtopnm(1), tifftopnm(1)

Copied to clipboard