s:graphicImage fails to transform GIF images
--------------------------------------------
Key: JBSEAM-1788
URL:
http://jira.jboss.com/jira/browse/JBSEAM-1788
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.0.BETA1
Environment: windows xp, JDK 1.6.0
Reporter: henrik lindberg
The org.jboss.seam.ui.graphicImage.Image class fails to rescale GIF images.
This is caused by the use of BICUBIC INTERPOLATION not working for GIF images.
I see three solutions (tested in similar code in one of my servlets that suffered from the
same problem):
- Use this rendering hint (in use now)
g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BICUBIC);
but then change the format name to "png" when writing with image IO
- Use this rendering hint
g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR);
and render as "gif"
- Use NEAREST_NEIGHBOR if image is written as a GIF, and BICUBIC otherwise.
The combination INTERPOLATION_BICUBIC (as well as INTERPOLATION_LINEAR) simply does not
work if the image is written with ImageIO in "gif" format.
The result is all white pixels.
--
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