I would like to "record" the canvas while my application is running. So, in the 
postSwap method of my subclassed Canvas3D class, I read the raster from the graphics 
context, then get the buffered image from the raster (Raster.getImage().getImage()). I 
then store this BufferedImage in an array so I can write the image to disc later (to 
keep the application framerate interactive). 

However, after I've finished recording and I get the stored images to write to disc, I 
find that all the images are the same as the current frame being displayed (suggesting 
that the ImageComponent is returning a reference to its BufferedImage data). The 
default behavior of ImageComponent is to copy the data on set and get, but since this 
did not seem to be working I also manually set the copy flag in the constructor. This 
did not work either. As a fix, I create a new ImageComponent2D with a new 
BufferedImage object every frame, which works but is not optimal. 

Is the ByCopying flag not being set in ImageComponent2D?

Thanks,
Sean

==========================================================================To 
unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to