Skip to main content

Creating a VolatileImage from a WritableRaster?

4 replies [Last post]
qu0ll
Offline
Joined: 2006-12-09

Is there a way to construct a volatile image from a writable raster? How?

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
Qu0llSixFour@gmail.com
[Replace the "SixFour" with numbers to email me]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
trembovetski
Offline
Joined: 2003-12-31

Create a BufferedImage from that raster, and copy it to a VolatileImage of appropriate size. You'll have to update the image every time the raster changes though.

It may be better just using the BufferedImage - although that depends on what you're trying to do.

Dmitri

qu0ll
Offline
Joined: 2006-12-09

Hi Dmitri,

Thanks for the tip, but how do I copy a BufferedImage into a VolatileImage?

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
Qu0llSixFour@gmail.com
[Replace the "SixFour" with numbers to email me]

linuxhippy
Offline
Joined: 2004-01-07

volatileImg.getGraphics().drawImage(buffImg....) ;)

qu0ll
Offline
Joined: 2006-12-09

Ah yes thanks, sorry about the dopey question.

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
Qu0llSixFour@gmail.com
[Replace the "SixFour" with numbers to email me]