// This approach is the slowest, because it decodes the Jpeg image. Of
// course you now have a decoded image to play with. In some instances
// this will be most appropriate.
try {
JPEGImageDecoder jpegDecoder = JPEGCodec.createJPEGDecoder(new FileInputStream(jpegFile));
BufferedImage image = jpegDecoder.decodeAsBufferedImage();
// now you can use the image
JPEGDecodeParam decodeParam = jpegDecoder.getJPEGDecodeParam();
Metadata metadata = JpegMetadataReader.readMetadata(decodeParam);
printImageTags(4, metadata);
} catch (FileNotFoundException e) {