W
Wayne
How can I obtain the raster data from an Image, without serializing it
to disk?
to disk?
Wayne said:How can I obtain the raster data from an Image, without
serializing it to disk?
I did, there was no method that gets the raw data out of an
Image that I saw. What method are you thinking of?
getSource() probably. Just need to look up the chain from it.
Note that this is a necessity for the absolutely all-purpose generic
Image class. If you happen to be manipulating an instance of its
BufferedImage subclass, and if you can assume you always will, you will
notice it offers more direct access to buffered data.
So you look up that type, which is 'ImageProducer', by clicking on the
handy-dandy link so politely offered in the description of the
'getSource()' method. Then you iteratively apply the technique for a
while, until it lands you on 'PixelGrabber', which seems to do what
you want.
<http://download.oracle.com/javase/6/docs/api/java/awt/image/
PixelGrabber.html>
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.