File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Canvas to BufferedImage while using Bufferstrategy Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Canvas to BufferedImage while using Bufferstrategy" Watch "Canvas to BufferedImage while using Bufferstrategy" New topic
Author

Canvas to BufferedImage while using Bufferstrategy

Dave Butterwick
Greenhorn

Joined: Dec 30, 2005
Posts: 9
I am trying to dump the contents of a Canvas that was drawn using a Bufferstrategy to a BufferedImage using the following code I found on the net:

but the returned image is blank/black and does not contain the drawing that appears on the Canvas. I'm guessing this technique isn't correct when using a BufferStrategy.
Is that true? If not how would I go about getting the results I desire?


Conformity is the jailer of freedom and the enemy of growth.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Canvas to BufferedImage while using Bufferstrategy