views:

117

answers:

1

Given an Image object, how do I turn that into a BufferedImage object without using any of the graphics stuff?

Thanks.

(P.S. I'm using Java ImageIO library)

+5  A: 

As this article (which provides an example of creating a BufferedImage from an Image) states:

An Image object cannot be converted to a BufferedImage object. The closest equivalent is to create a buffered image and then draw the image on the buffered image. This example defines a method that does this.

shadit