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

GIFWriter returns the same compression type twice

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b143
    • CPU:
      generic
    • OS:
      generic

      Description

      I am getting the default ImageWriteParam from GIF Writer and calling getCompressionTypes(). This method returns 2 compression types as supported. I initially thought that this writer supports 2 different compression types. But when I looked at the type strings, both of them are actually the same except the fact that one of them is in upper case. Also I don't see any difference in the resulting images that are written using these 2 compression types.

      I feel it is misleading to return the same compression type twice. We do have some special definitions in ImageWriteParam at many places where we refer to the line ' If there are multiple compression types'. So user may assume that many compression types are supported by this writer whereas it is not the case. Moreover, we specifically say in the API doc for getCompressionTypes() that we would return a list of compression types only when there are multiple compression types supported and only if the user is able to make a meaningful choice from the list returned. If there is only one mandatory form of compression, then we could just return one or null to indicate that there is only one compression type supported (just like JPEG for JPEG image types).

      This is noticed on all mustang builds that has this feature. This is reproducible on all platforms.
      Run the attached test for reproducing the bug.

      ###@###.### 2005-07-07 10:15:42 GMT

        Attachments

          Activity

            People

            Assignee:
            jdv Jayathirth D V
            Reporter:
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: