public Dimension getExifThumbnailSize() throws ImagingException, IOException {
        final byte[] data = getExifThumbnailData();

        if (data != null) {
            return Imaging.getImageSize(data);
        }
        return null;
    }
Returns the size of the first JPEG thumbnail found in the EXIF metadata.

@return Thumbnail width and height or null if no thumbnail.
@throws ImagingException if it fails to read the image
@throws IOException      if it fails to read the image size
src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImageMetadata.java