>>>>> "PB" == Peter Becker <[EMAIL PROTECTED]> writes:

PB> upgrading to Batik 1.1.1 I have some problems getting the color of
PB> PNGs right. Basically I just run PNGTranscoder on an SVG file and
PB> e.g.  #EE9D00 (given as fill="rgb(236,158,0)" for a <rect>) turns
PB> into #F6A100. The JPEGTranscoder works fine. Problem can be
PB> reproduced by running batik-rasterizer.jar from 1.1.1 on this:

[...]

PB> The problem disappears when the filter effect or the whole <text>
PB> is removed. Transcoding this SVG with batik-rasterizer into a JPEG
PB> failed somehow (empty image of appropriate size). Is this wrong:

PB>     java -jar batik-rasterizer.jar -m image/jpeg -q 0.5 image.svg

PB> The original problem appears on Win98/JDK1.4 and SuSE7.3/JDK1.4,
PB> all debugging was done with Linux.

PB> Any ideas what's going on?

    I'm not 100% sure but I suspect JDK 1.4 is at fault.  I can't
reproduce your problem on my system (Solaris, JDK 1.3.1).  There is a
small possability that the PNG/JPEG difference is caused by the tool
you are using to display the PNG (it may be trying to adjust the PNG
to match your monitors gamma).

    As for why the filter might effect everything, your filter is
defined to cover the whole canvas (and then some).  So your filter
chain results in an object that get's composited over the entire
canvas if this object is not 100% transparent outside the text (which
it should be barring other bugs) it may tint the rest of the graphic.

    You can see if this is part of the problem by using a less
aggresive filter region (if set properly you should be able to see the
edges of the filter effect if it is causing the weirdness.

    As too why the filter is messed up I'm guessing an alpha premult
problem (either in Batik or JDK 1.4) but since I haven't done anything
with JDK 1.4 I can't really say for sure.  I would also suspect that
the JPEG problem is related to JDK 1.4 as they changed how the JPEG
encoder was implemented.

    I hope this helps at least a little.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to