JPEG libraries for Java
- ImageIO (
javax.imageio) is part of the JDK: read and write JPEG with a quality setting and progressive mode, no dependencies. It fails on CMYK/YCCK JPEGs, ignores the Exif orientation and can’t write images with an alpha channel. - TwelveMonkeys is a set of ImageIO plugins. Its JPEG plugin replaces the JDK reader when it’s on the classpath and fixes most of the JDK’s failures: CMYK and YCCK images, Adobe color transforms, broken and truncated files, lossless JPEG. Your
ImageIO.readcode stays the same. - metadata-extractor reads Exif, GPS, XMP, IPTC, ICC and camera maker notes. It’s the standard Exif library for Java and Android.
For resizing, Thumbnailator (MIT) and imgscalr (Apache 2.0) work on top of ImageIO.
- ImageIO Java ImageIO (javax.imageio) reads and writes JPEG with no dependencies. How to load and save JPEG, set the quality, write progressive files.
- metadata-extractor metadata-extractor is the standard Java library for reading Exif, GPS, XMP, IPTC and ICC metadata from JPEG. How to list tags, get camera model, date taken.
- TwelveMonkeys TwelveMonkeys is an open-source ImageIO plugin that makes Java read CMYK, YCCK and broken JPEG files. How to add it with Maven or Gradle, check it's active.