]
Tony Herstell commented on JBSEAM-2616:
---------------------------------------
Can the transform
also have a flag to NOT resize the image if it is already smaller than both of the
maxWidth or maxHeight
e.g.
dontUpScale="true"
otherwise you get small images streched up and they look awful.
<s:transformImageSize> fills transparent areas with white
background
--------------------------------------------------------------------
Key: JBSEAM-2616
URL:
https://jira.jboss.org/jira/browse/JBSEAM-2616
Project: Seam
Issue Type: Bug
Components: JSF Controls
Affects Versions: 2.0.0.GA
Environment: Windows, Jboss 4.2.1, Facelets
Reporter: Manfred Griesser
Assignee: Pete Muir
Priority: Minor
Fix For: The future
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: