Workaround black raster generation in PDF
-----------------------------------------
Key: GEOS-1461
URL: http://jira.codehaus.org/browse/GEOS-1461
Project: GeoServer
Issue Type: Improvement
Components: WMS
Affects Versions: 1.6.0-beta4
Reporter: Andrea Aime
Assignee: Simone Giannecchini
Fix For: 1.6.0-RC1
Hi Simone. As you may know, rendering rasters onto pdf generates black images. I tracked down the issue to the following code in GridCoverageRenderer:
{code}
// //
// Opacity
// //
double opacity = SLD.opacity( symbolizer );
graphics.setComposite( AlphaComposite.getInstance( AlphaComposite.DST_IN ) );
Color c = new Color(0.0f, 0.0f, 0.0f, (float) opacity);
graphics.setColor(c);
graphics.fillRect(0, 0, this.destinationSize.width, this.destinationSize.height);
{code}
if I comment it out the image renders properly, apparenlty iText is not handling correctly DST_IN composition. Suggestions on how to workaround this?
Moreover, I'm not totally sure this code is fully correct. What if the graphics contained lower layers alredy rendered, wouldn't they be affected too by the above code?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira