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

TIFF transcoder in v1.9.1 looks for invalid class name for its WriteAdapter

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: None
    • Component/s: SVG Rasterizer
    • Labels:
      None

      Description

      org.apache.batik.apps.rasterizer.Main -scriptSecurityOff test.svg -m image/tiff
      Added jai_imageio.jar to classpath

      In batik-transcoder 1.9.1, the class org.apache.batik.transcoder.image.TIFFTranscoder is looking for implementation of interface org.apache.batik.transcoder.image.TIFFTranscoder.WriterAdapter. It looks for exactly these two classnames: org.apache.batik.ext.awt.image.codec.tiff.TIFFTranscoderInternalCodecWriteAdapter and org.apache.batik.transcoder.image.TIFFTranscoderImageIOWriteAdapter. There are no classes with this FQN in batik-codec 1.9.1. However, there is the following class: org.apache.batik.ext.awt.image.codec.imageio.TIFFTranscoderImageIOWriteAdapter which implements the required interface. So most likely, the code of TIFFTranscoder should look for WriteAdapter in package o.a.b.e.a.i.c.imageio instead of o.a.b.e.a.i.c.tiff.

      Proposed patch (starting with line 103 of TIFFTranscoder.java):

              WriteAdapter adapter = getWriteAdapter(
                      "org.apache.batik.ext.awt.image.codec.tiff.TIFFTranscoderInternalCodecWriteAdapter");
              if (adapter == null) {
                  adapter = getWriteAdapter(
                      "org.apache.batik.transcoder.image.TIFFTranscoderImageIOWriteAdapter");
              }
              if (adapter == null) {
                  adapter = getWriteAdapter(
                      "org.apache.batik.ext.awt.image.codec.imageio.TIFFTranscoderInternalCodecWriteAdapter");
              }
              if (adapter == null) {
                  throw new TranscoderException(
                          "Could not write TIFF file because no WriteAdapter is availble");
              }
      

        Attachments

          Activity

            People

            • Assignee:
              ssteiner Simon Steiner
              Reporter:
              tzok Tomasz ┼╗ok
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: