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

ImageWriterSpi.canEncodeImage() should not be too optimistic

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4
    • None
    • 6
    • client-libs
    • None

    Description

      during work on 6480688 I've found that ImageWriterSpi.canEncodeImage() may be too optimistic
      about writer's ability to encode image. I.e. as far as I understand gif writer may not be able
      to write image with tranlucency, but even the following check

      imageWriter.getOriginatingProvider().canEncodeImage(new ImageTypeSpecifier(renderedImage))

      where:
       imageWriter - a writer we are going to use
       renderedImager - RenderedImage we are going to encode

      usually returns true, but results of write/read of this image may not be very successful :(

      The attached test demonstrates this problem for gif writer.
      Left canvas contains original image, right one image after write/read.

      Attachments

        Issue Links

          Activity

            People

              jdv Jayathirth D V
              son Oleg Sukhodolsky (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Imported:
                Indexed: