Skip navigation.
Home

NETPBM utilities for JPEG 2000

Part of Netpbm graphics conversion and manipulation package, jpeg2ktopam converts the named JPEG 2000 code stream file, or Standard Input if no file is named, to a PBM, PGM, PPM, or PAM file on Standard Output while pam2jpeg2k performs the opposing conversion.

"The JPEG-2000 specification specifies two different formats: JP2 and JPEG-2000 code stream (JPC). JP2 represents a visual image quite specifically, whereas JPC is a more or less arbitrary array of codes. JP2 images are a subset of JPC images. jpeg2ktopam converts any JPC image. If the color space identified in the image is grayscale (JAS_IMAGE_CS_GRAY), jpeg2ktopam generates a PGM image, unless the image contains only one bit per pixel, in which case jpeg2ktopam generates PBM. If the color space is RGB (JAS_IMAGE_CS_RGB), jpeg2ktopam generates a PPM image. If the input image is anything else, jpeg2ktopam generates a PAM image with no tuple type identified."

These two programs use Jasper JPEG-2000 library. The program jasper, which is packaged with the Jasper JPEG-2000 library, also converts between JPEG-2000 and PNM formats. Because it's packaged with the library, it may exploit it better, especially recently added features. However, since it does not use the Netpbm library to read and write the Netpbm formats, it doesn't do as good a job on that side.