Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8351218

Support for thumbnails present in APP1 marker for JPEG

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 25
    • client-libs
    • None
    • behavioral
    • low
    • Thumbnail images will now be available in some cases that they were not, but only applications which ask for thumbnails should be affected, which is rare, and they should already be prepared to receive thumbnails.
    • Other
    • SE

      Summary

      Specify how thumbnails will be read for javax.imageio JPEG EXIF APP1 markers.

      Problem

      Exif thumbnails cannot be read by the current javax.imageio JPEG reader. This is important as Exif is very commonly used by digital still cameras to store JPEG-compressed photos.

      The built in JPEG image reader is already able to read thumbnail images contained in JFIF and JFIF extension APP0 marker segments, but should be updated to read a thumbnail contained in an Exif APP1 marker segment.

      However the ImageIO JPEG 'metadata' specification does not explain how the JPEG reader will expose thumbnails accounting for both JFIF and EXIF.

      Solution

      Document in the JPEG 'metadata' specification how the JPEG reader will expose thumbnails accounting for both JFIF and EXIF.

      Specification

      --- a/src/java.desktop/share/classes/javax/imageio/metadata/doc-files/jpeg_metadata.html
      +++ b/src/java.desktop/share/classes/javax/imageio/metadata/doc-files/jpeg_metadata.html
      @@ -509,6 +509,17 @@ <h2>
       <h2>
       <a id=thumbs>Thumbnail Images</a>
       </h2>
      +<h3>
      +Reading Thumbnail Images
      +</h3>
      +Thumbnail images are read from JFIF, JFIF extension, and Exif marker segments.
      +One or more thumbnails may be present in the JFIF segment(s), but at most one
      +will be present in the Exif segment. As specified, JFIF and Exif marker segments
      +should be mutually exclusive, but if they are both present, then any JFIF
      +thumbnail(s) will precede any Exif thumbnail.
      +<h3>
      +Writing Thumbnail Images
      +</h3>
       Thumbnails are supported by the use of JFIF and JFIF extension marker segments.
       Thumbnails provided on the write methods determine the thumbnails that will be
       included.  <code>app0JFIF</code> and <code>app0JFXX</code> nodes present in

            bpb Brian Burkhalter
            jdv Jayathirth D V
            Philip Race
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: