ImageWriterSpi.canEncodeImage() should not be too optimistic

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • None
    • Affects Version/s: 6
    • Component/s: client-libs
    • None

      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.

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

              Created:
              Updated:
              Imported:
              Indexed: