Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-787

[PATCH] PNG export: indexed option doesn't work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • 1.8
    • None
    • SVG Viewer
    • Operating System: All
      Platform: All

    Description

      The indexed option of the PNG export in the SVG viewer has no effect.
      This is because KEY_INDEXED is set to 256 while it seems to be expected
      to be 8 if the number of palette entries should be 256 = 2^8.
      A value of 256 will be ignored in
      sources/org/apache/batik/ext/awt/image/codec/png/PNGTranscoderInternalCodecWriteAdapter.java

      I'll post a simple patch, but the indexed option is still quite unusable
      because it dithers a white background, even if only one other color is used.

      Attachments

        1. Batik-Bug43847-Patch.patch
          2 kB
          Helder Magalhães
        2. mon-ix.png
          27 kB
          x00000000
        3. png.indexed.patch
          0.6 kB
          x00000000
        4. t.png
          1 kB
          x00000000
        5. t.svg
          0.2 kB
          x00000000

        Activity

          People

            batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
            x00000000@freenet.de x00000000
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: