[ 
https://issues.apache.org/jira/browse/BATIK-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tomasz Żok updated BATIK-1198:
------------------------------
    Description: 
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):

{code: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");
        }
{code}


  was: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}}.


> TIFF transcoder in v1.9.1 looks for invalid class name for its WriteAdapter
> ---------------------------------------------------------------------------
>
>                 Key: BATIK-1198
>                 URL: https://issues.apache.org/jira/browse/BATIK-1198
>             Project: Batik
>          Issue Type: Bug
>          Components: SVG Rasterizer
>    Affects Versions: 1.9
>            Reporter: Tomasz Żok
>
> 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):
> {code: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");
>         }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-h...@xmlgraphics.apache.org

Reply via email to