[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-2616) <s:transformImageSize> fills transparent areas with white background
Pete Muir (JIRA)
jira-events at lists.jboss.org
Fri Mar 28 06:32:40 EDT 2008
[ http://jira.jboss.com/jira/browse/JBSEAM-2616?page=all ]
Pete Muir updated JBSEAM-2616:
------------------------------
Fix Version/s: (was: 2.0.2.GA)
Slip, Andy Rubinger is rewriting Image transform code for us.
> <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
> Assigned To: Pete Muir
> Priority: Minor
> Fix For: 2.1.0.GA
>
>
> 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
More information about the seam-issues
mailing list