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

GIF native IIOMetadata assumes characterCellWidth/Height as 2bytes

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 11
    • client-libs
    • None
    • behavioral
    • minimal
    • The changes proposed in this CSR do not modify the API specification but pertain to two specific Attributes in the XML schema for GIF Image metadata.
    • Java API
    • SE

      Summary

      Correct the maximum permissible value for two Attributes of PlainTextExtension Element in the XML schema for GIF Image Metadata as recommended by the image specification.

      Problem

      . The maximum permissible value for two Attributes namely- Character Cell Width and Character Cell Height, of PlainTextExtension Element in the XML schema for GIF Image Metadata is incorrect.
      . GIF Image specification version 89a mentions that the concerned attributes occupy 1 Byte each in the Plain Text Extension Block and hence, the maximum permissible value for these two attributes would be 255.

      Solution

      . Correct the maximum permissible value for the concerned Attributes in the XML schema for GIF Image Metadata.
      . The XML schema for GIF Image metadata is documented in a HTML file that can be located at- src/java.desktop/share/classes/javax/imageio/metadata/doc-files/gif_metadata.html
      . The proposed solution and relevant code changes have been reviewed for correctness.
      . Review discussions can be found at- http://mail.openjdk.java.net/pipermail/2d-dev/2018-March/009030.html

      Specification

      File: src/java.desktop/share/classes/javax/imageio/metadata/doc-files/gif_metadata.html

           289       <!ATTLIST "PlainTextExtension" "characterCellWidth" #CDATA
           290          #REQUIRED>
           291         <!-- The width of a character cell -->
           292         <!-- Data type: Integer -->
           293         <!-- Min value: 1 (inclusive) -->
      --   294         <!-- Max value: 65535 (inclusive) -->
      ++   294         <!-- Max value: 255 (inclusive) -->
      
           295       <!ATTLIST "PlainTextExtension" "characterCellHeight" #CDATA
           296          #REQUIRED>
           297         <!-- The height of a character cell -->
           298         <!-- Data type: Integer -->
           299         <!-- Min value: 1 (inclusive) -->
      --   300         <!-- Max value: 65535 (inclusive) -->
      ++   300         <!-- Max value: 255 (inclusive) -->

            pnarayanan Prahalad Kumar Narayanan (Inactive)
            igor Igor Nekrestyanov (Inactive)
            Philip Race
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: