I've been painting on a Canvas using the Graphics object returned by
getGraphics(). I would like to save an area on the Canvas and later write
it back to the Canvas. I've been looking for some way to create a
BufferedImage using the pixels from a Graphics object, but no luck.
How do I obtain the pixels from an area on a Canvas?
Thanks,
Cameron
Knute Johnson - 30 Oct 2006 03:27 GMT
> I've been painting on a Canvas using the Graphics object returned by
> getGraphics(). I would like to save an area on the Canvas and later write
[quoted text clipped - 5 lines]
> Thanks,
> Cameron
Draw them on the BufferedImage first, then draw the BufferedImage onto
the Canvas.

Signature
Knute Johnson
email s/nospam/knute/
Josh Falter - 30 Oct 2006 16:34 GMT
There's always the classic java.awt.Robot createScreenCapture() or
getPixelColor()
Andrew Thompson - 30 Oct 2006 17:24 GMT
> There's always the classic java.awt.Robot createScreenCapture() or
> getPixelColor()
Your definition of 'always' does not include
sandboxed applications and applets?
Andrew T.