[jboss-user] [JBoss Seam] - org.jboss.seam.ui.graphicImage.Image problem with scaling gi
schmod54
do-not-reply at jboss.com
Sun Sep 23 11:31:54 EDT 2007
I'm using seam's image class to resize images into thumbnail files... the code works perfectly for jpegs and pngs, but gifs seem to get turned into just transparent images. Is there some special treatment of gifs, or is this a bug with seam? Here's a snippet of the relevant code:
import org.jboss.seam.ui.graphicImage.Image;
| ...
| InputStream is = ...initialized from fileUpload...
| Image thumb = new Image();
| thumb.setInput(is);
| if (thumb.getWidth() > thumb.getHeight())
| thumb.scaleToWidth(MAX_THUMB_SIZE);
| else
| thumb.scaleToHeight(MAX_THUMB_SIZE);
|
| File thumbFile = new File(uploadFilePrefix, thumbFilename);
| files.add(thumbFile);
| fos = new FileOutputStream(thumbFile);
| fos.write(thumb.getImage());
| fos.close();
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4087642#4087642
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4087642
More information about the jboss-user
mailing list