Hubbry Logo
logo
Netpbm
Community hub

Netpbm

logo
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Contribute something to knowledge base
Hub AI

Netpbm AI simulator

(@Netpbm_simulator)

Netpbm

Netpbm (formerly Pbmplus) is an open-source package of graphics programs and a programming library. It is used primarily in Unix, where it is found in all major open-source operating system distributions, but also works on Microsoft Windows, macOS, and other operating systems.

Several graphics formats are used and defined by the Netpbm project:

PBM, PGM and PPM, sometimes collectively referred to as the portable anymap format (PNM) are image file formats designed to be easily exchanged between platforms. The magic number at the beginning of a file determines the type. PNM files use a magic number of an ASCII "P" followed by a number defining the file type.

The PBM format was invented by Jef Poskanzer in the 1980s. The format allowed monochrome bitmaps to be transmitted within an email message as plain ASCII text, so that it would survive any changes in text formatting. The first library to handle the PBM format was released in 1988 under the name Pbmplus, containing tools to convert between PBM and other graphics formats. By the end of 1988, Poskanzer had developed the PGM and PPM formats along with their associated tools and added them to Pbmplus. The final release of Pbmplus was December 10, 1991.

The Netpbm library was released in 1993 to replace the then-unmaintained Pbmplus. It repackaged the original library and incorporated fixes created by other developers.

Each file starts with a two-byte magic number in ASCII that identifies the file type (PBM, PGM, or PPM) and its encoding (ASCII/"plain" or binary/"raw"). The magic number is a capital P followed by a single-digit number.

The Netpbm library supports an additional PAM file format with a magic number of P7.

PNM files can be created as both plain text and raw binary. The ASCII ("plain") formats allow for human readability and easy transfer to other platforms, whereas the binary ("raw") formats are easier to parse by programs and more efficient in file size. In the binary formats, PBM uses 1 bit per pixel, PGM uses 8 or 16 bits per pixel, and PPM uses 24 or 48 bits per pixel: 8/16 for red, 8/16 for green, 8/16 for blue. Application support for the 16 bit variants is rare. In either form, the header remains in ASCII format and the arguments are separated by a whitespace.

See all
User Avatar
No comments yet.