(It seems I sent this a couple of months ago, but didn't receive a response.)
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 image frames are the same as the last frame displayed (suggesting that the ImageComponent is returning a reference to its BufferedImage data, which is now set to the last frame). 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
CaptureCanvas3d.java
Description: CaptureCanvas3d.java
