<s:transformImageSize> fills transparent areas with white background
--------------------------------------------------------------------
Key: JBSEAM-2616
URL:
http://jira.jboss.com/jira/browse/JBSEAM-2616
Project: JBoss Seam
Issue Type: Bug
Components: JSF Controls
Affects Versions: 2.0.0.GA
Environment: Windows, Jboss 4.2.1, Facelets
Reporter: Manfred Gleirscher
Priority: Minor
if a png-image containing transparent areas is scaled, the transparent areas get filled
with white color.
I created my own transformImageSize-component which works properly.
Its applyTransformation method looks like that:
<code>
public void applyTransform(Image image) throws IOException {
...........
BufferedImage in = image.getBufferedImage();
GraphicsConfiguration gc = in.createGraphics().getDeviceConfiguration();
BufferedImage out = gc.createCompatibleImage(scaledWidth, scaledHeight,
Transparency.BITMASK);
Graphics2D g2d = out.createGraphics();
g2d.setComposite(AlphaComposite.Src);
g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BICUBIC);
g2d.drawImage(in, 0, 0, scaledWidth, scaledHeight, null);
g2d.dispose();
image.setBufferedImage(out);
}
</code>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira