[
https://jira.jboss.org/browse/JBSEAM-3917?page=com.atlassian.jira.plugin....
]
Gonzalez Adrian commented on JBSEAM-3917:
-----------------------------------------
To add bmp handling, just modify org.jboss.seam.ui.graphicImage.Image class (add the
following IMAGE_BMP field in enum Type) :
public enum Type
{
IMAGE_PNG("image/png", ".png", "PNG"),
IMAGE_JPEG("image/jpeg", ".jpg", "JPEG",
"image/jpg"), IMAGE_GIF(
"image/gif", ".gif", "GIF"),
IMAGE_BMP("image/bmp", ".bmp", "bmp");
NPE in Image.getImage() for images with unsupported content type
----------------------------------------------------------------
Key: JBSEAM-3917
URL:
https://jira.jboss.org/browse/JBSEAM-3917
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.1.1.GA
Reporter: Daniel Wiell
Image.readImage(InputStream) sets contentType to null if the type of the image is unknown
(say a bmp).
When invoking Image.getImage(), a NPE is thrown:
java.lang.NullPointerException
at org.jboss.seam.ui.graphicImage.Image.getImage(Image.java:154)
ImageIO.write(bufferedImage, getContentType().getImageFormatName(), outputStream);
getContentType() returns null.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira