Hello,
after upgrading to Batik 1.1.1 I have some problems getting the color of
PNGs right. Basically I just run PNGTranscoder on an SVG file and e.g.
#EE9D00 (given as fill="rgb(236,158,0)" for a <rect>) turns into
#F6A100. The JPEGTranscoder works fine. Problem can be reproduced by
running batik-rasterizer.jar from 1.1.1 on this:
<?xml version="1.0" encoding="UTF-8"?>
<svg width="500" height="70">
<filter id="dropShadow" filterUnits="userSpaceOnUse" x="-10" y="-10"
width="650" height="100">
<feFlood result="grey" flood-color="rgb(89,89,89)" flood-opacity="1"/>
<feOffset in="SourceAlpha" result="offset" dx="2" dy="1"/>
<feComposite operator="in" in="grey" in2="offset" result="shadow"/>
<feComposite in="SourceGraphic" in2="shadow" operator="over"/>
</filter>
<rect fill="rgb(236,158,0)" x="0" y="0" width="500" height="70"/>
<rect fill="rgb(255,255,255)" x="20" y="10" width="460" height="50"/>
<rect fill="rgb(89,89,89)" x="21" y="11" width="458" height="48"/>
<rect fill="rgb(255,255,255)" x="25" y="15" width="450" height="40"/>
<text font-family="Arial" font-weight="bold" font-size="32"
fill-opacity="1" fill="rgb(236,158,0)" stroke-opacity="1"
stroke-width="3" color="rgb(236,158,0)" text-anchor="middle" x="250"
y="45" filter="url(#dropShadow)">oopsala</text>
</svg>
The problem disappears when the filter effect or the whole <text> is
removed. Transcoding this SVG with batik-rasterizer into a JPEG failed
somehow (empty image of appropriate size). Is this wrong:
java -jar batik-rasterizer.jar -m image/jpeg -q 0.5 image.svg
?
The original problem appears on Win98/JDK1.4 and SuSE7.3/JDK1.4, all
debugging was done with Linux.
Any ideas what's going on?
Thanks,
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]