xmlgraphics-batik-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 44682] TranscoderException and EnclosedException when transform a svg- to jpeg-file
Date Thu, 27 Mar 2008 12:33:31 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=44682





--- Comment #1 from ks <ks@vitronic.de>  2008-03-27 05:33:31 PST ---
Hi,
I found the cause for the resulting exception. It was a missed dependency for
the transcoder.
The following dependency must be included in the "batik-transcoder-1.7.pom", to
get the example work as expected (see
http://xmlgraphics.apache.org/batik/using/transcoder.html#createImage).

<dependency>
        <groupId>org.apache.xmlgraphics</groupId>
        <artifactId>batik-codec</artifactId>
        <version>1.7</version>
</dependency>


I´ve tried the transcoding of an png-image, insted of a jpeg-image, to see if
I would run in the same problem. The problem showed up again, but the
error-message, which was this time from the PNGTranscoder, gave me the hint I
needed.

"Could not write PNG file because no WriteAdapter is availble".


Aha. A short search in the PNGTranscoder source led me to line 110.
WriteAdapter adapter =
getWriteAdapter("org.apache.batik.ext.awt.image.codec.png.PNGTranscoderInternalCodecWriteAdapter");

And another short search in the libraries of my project, showed me that there
was the batik-codec-1.7.jar library missing.
I added that one to my projects pom.xml, ran maven and the JUnitTest again, and
the image was created. :-)


I currently use the repository
http://repo1.maven.org/maven2/org/apache/xmlgraphics/.
I don´t know where the base-repo is. So could someone with write access to the
base-repo add the dependency to the "batik-transcoder-1.7.pom"
and close this bug afterwards?

Thanks
Best regards
ks


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


Mime
View raw message