PNM Toolbox 3.0
2003-11-03
As of MATLAB 6.1 (Release 13), the MATLAB functions imread, imwrite, and imfinfo, support PPM, PGM, PBM, and RAS images. There is still no support for SGI and XBM images, though.
Contents
- Description
- What’s new
- Download the files
- Extract the files
- Install the files
- PNM image format specifications
- Utilities supporting the PNM formats
Description
The PNM Toolbox is a collection of MATLAB programs for reading and writing image files. The supported formats are PPM (portable pixelmap), PGM (portable graymap), PBM (portable bitmap), RAS (Sun raster file), SGI/RGBA/RGB/BW (Silicon Graphics image files) and XBM (X11 bitmap) image files.
For more details see the file Readme.m or type info pnm at the MATLAB prompt when the toolbox is installed.
What’s New
The following changes have been made since the previous release.
- Simplified installation. MATLAB now has a way of adding support for new image formats dynamically. This makes installation much easier.
- Fixed some bugs in the “old-style” functions pgmread, xbmwrite, etc.
- Fixed some typos and made some small changes to the internals.
Download the files
For the latest version, get pnm-3.0.tar.gz or pnm-3.0.zip.
For the latest version that is compatible with MATLAB 4.2, get pnm-1.002.tar.gz or pnm-1.002.zip.
All releases are available in the archive directory.
Extract the files
How to extract the files depends on the type of archive. In the description below, VERSION must be replaced with the appropriate version number.
Gzip-compressed tar file
The files are extracted with, for instance
gunzip -c pnm-VERSION.tar.gz | tar xvf -
or
gzip -cd pnm-VERSION.tar.gz | tar xvf -
Zip-compressed file
The files are extracted with, for instance
unzip pnm-VERSION.zip
If you don’t have unzip, go to InfoZip’s home page and get it. It’s free and available for numerous platforms.
Installing the toolbox
See the file install.txt in the distribution.
Image format specifications
- The PPM manual page as plain text and HTML.
- The PGM manual page as plain text and HTML.
- The PBM manual page as plain text and HTML.
- The PNM manual page as plain text and HTML.
Utilities supporting the formats
Several utilities support the PNM file formats. For instance, the UNIX utilities XV and Gimp and the Windows utility Paint Shop Pro. Some utilities exist for several platforms, for instance ImageMagick.
A good image conversion toolkit is NetPBM for UNIX and NetPBM for Win32.