Hi all,
So here's my challenge:
I have code that gives me a java.awt.Image that is NOT a
BufferedImage. The only Java code I can find for saving an image
requires you to have a BufferedImage. I found some code that should
make a BufferedImage from an Image:
int type = BufferedImage.TYPE_INT_RGB;
int width = theImage.getWidth (null);
int height = theImage.getHeight (null);
BufferedImage bufferedImage = new BufferedImage (width, height,
type);
if (!bufferedImage.getGraphics().drawImage(theImage, 0 , 0, null))
return null;
return bufferedImage;
This code works every time, when I single step through the debugger.
However, when I try to just run the code, it fails every time.
1: Is there a way to write an Image that isn't a BufferedImage to
disk?
2: Is there a good way to send a java.awt.Image to a GWT client?
3: Is there any reason why the above code should not work in a
servlet?
TIA,
Greg
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.