Apache Commons logo Commons Imaging™ logo

Image Format Support

Format Read Write Notes References
BMP yes yes Mostly Complete. May not read some cursors, icons and OS/2 bitmaps. Controlling the exact format when writing is incomplete. No spec, see: wikipedia
GIF yes yes Both versions 87a and 89a Reading of animated GIFs is supported to the extent that you can read all of the images contained in a GIF, but timing/loop info is ignored. Controlling the exact format when writing is incomplete. spec wikipedia
JPEG/JFIF some no Reads only simple grayscale and YCbCr baseline sequential JPEG images without RST markers, which must use 8 bits per component and be Huffman encoded. Can read image info, metadata and extract ICC Profiles. Both JFIF and DCF/EXIF. Provides JPEG comments in ImageInfo. JFIF spec JPEG Group wikipedia
ICNS mostly mostly Missing support for JPEG2000 icons, but all other formats and sizes are correctly read and written. Extensively tested for correctness against MacOS X, including behavior with missing masks. wikipedia
ICO/CUR yes mostly Reads 1/4/8/16/24/32 bpp .ico and .cur files. Supports the new Windows Vista ICO files with embedded PNGs. Deals correctly with alpha vs bitmask transparency issues in 32 bpp. Supports bitfield compressed bitmaps. Extensively tested. Probably the best open-source implementation under the sun. No spec, see: wikipedia
PCX/DCX yes yes Reads 1 plane 1/2/4/8 bit, 1 bit 1/2/3/4 plane, 3 plane 8 bit, 1 plane 24 bit, and 1 plane 32 bit images. Monochrome is parsed correctly. Reads and can write the undocumented uncompressed PCX format. Reading short DCX tables is supported. Thoroughly tested.
PNM/PGM/PBM/PPM/PAM Portable Pixmap yes mostly Reading complete. PAM writing only in RGB_ALPHA format. spec wikipedia
PNG yes yes Supported through version 1.2/ISO/IEC standard (15948:2003). Controlling the exact format when writing is incomplete. spec wikipedia
PSD/Photoshop yes no Basic support. Can only read the first Layer. No support for extra channels. Supports all modes except Multichannel. Can read some image metadata. Unofficial spec spec wikipedia
RGBE/Radiance HDR yes no Basic support. Wikipedia
TIFF yes yes Supported through version 6.0. TIFFs is a open-ended container format, so it's not possible to support every possibly variation. Supports Bi-Level, Palette/Indexed, RGB, CMYK, YCbCr, CIELab and LOGLUV images. Supports reading and writing LZW, CCITT Modified Huffman/Group 3/Group 4, and Packbits/RLE compression. Notably missing other forms of compression though, including JPEG. Supports reading Tiled images. Adobe spec wikipedia AWare Systems TIFF Tag Reference
WBMP yes yes Complete support for WBMP type 0 bitmaps. wikipedia spec
XBM yes yes Complete. wikipedia spec
XPM yes yes Only XPM version 3 is currently supported, but the other versions are obsolete. Reads all color formats, including those using symbolic names from rgb.txt. Writing only writes color data. wikipedia spec

Metadata Format Support

Format Read Write Notes References
JPEG/JFIF EXIF Metadata yes yes Can read and write EXIF data to and from existing JPEG/JFIF files WITHOUT modifying image data. Exif Specs, etc. wikipedia AWare Systems TIFF Tag Reference (JPEG EXIF metadata is stored in TIFF directories) Phil Harvey's exiftool and metadata reference Phil Harvey on writing EXIF
JPEG/JFIF IPTC Metadata yes soon Can read IPTC data from existing JPEG/JFIF files WITHOUT modifying image data. IPTC Specs, etc. wikipedia IEEE article
XMP yes yes Can read XMP XML (as as String) from TIFF, GIF, PNG, JPEG and PSD. Can embed XMP XML when writing GIF, PNG and TIFF. Can remove, insert and update XMP XML into existing JPEG files. Adobe site with Spec wikipedia