Thomas E Deweese wrote: >>>>>>"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). > I don't have a 1.2 or 1.3 installed at the moment, I'll test that later. The problem occored first in IE5.5 on Win98, then in Konqueror on SuSE 7.3 -- I don't think it's a problem with the display, esp. since it happens only when the filter is involved.
>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. > Actually I can't see the edges, but KDE's color picker claims they are there. That's a little bit weird since I found exactly the same difference visually rather annoying in the first place, but probably related to some settings in KDE. If I change the top-left corner of the filter to (40,40) the top and left area will have the correct color, the rest is still wrong. I know it is not specific to Batik but how do you set the size of a filter like a drop shadow so it does fit but is not as huge as my version? >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. > JDK 1.4 broke the versions of Xerxes and Batik I used before (Xerxes didn't add nodes anymore, Batik rendered text with a pretty significant offset -- all breaking silently, i.e. without any error messages) -- it showed me that a number of things seem to be different between 1.3 and 1.4 (as you wouldn't expect from a minor version, would you?). The changes sometimes seem to be quite weird, so I actually do believe that the problem could go away by using a 1.3.x JRE -- unfortunately I am currently trying to get my program to work with JRE 1.4, so this notion doesn't help :-( I don't want to keep this as known bug and blame Sun if I can avoid it somehow. Hopefully I'll get a new harddisk today or tomorrow, afterwards I'll install a number of JDKs for testing (Windows and Linux). How hard do you think will it get to track that problem down in the code if you have only a faint idea of how Batik works? I have some experience in debugging other people's code, but Batik seems to be quite complex. Peter --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
