DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6775>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6775 [PATCH] Re-Enabling generating JPEGs under JDK1.4.0/Cocoon Summary: [PATCH] Re-Enabling generating JPEGs under JDK1.4.0/Cocoon Product: Batik 1.0 Version: 1.1.x Platform: All OS/Version: All Status: NEW Severity: Major Priority: Other Component: SVG Rasterizer AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] If you are using JDK1.4.0, use the JPEGTranscoder and have set the hint ImageTranscoder.KEY_BACKGROUND_COLOR (like the Cocoon SVGSerializer presetting white as background color), you receive a blank image with the hinted background color you set instead of the image you wanted. This is produced due to the single, misplaced g2d.dispose()-call - according to the Javadoc, g2d.dispose() releases all related system resources and makes the Graphics2D unusable, but currently, after disposing g2d, it is being used by painting the image on it. Seems like the JDK1.4.0 has some changes under the hood that now enforce the spec. Cut the g2d.dispose()-call out of the if-statement checking for the ImageTranscoder.KEY_BACKGROUND_COLOR hint and move it further down, paste it into a new line directly before "rend = null;". Making this change to batik, rebuilding libs-jar and replacing the default batik jar in Cocoon, it suddenly serializes SVG to JPEGs under JDK1.4.0 again like a charm. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]