freelanceprogrammers.org Forum Index » Java

Double-Buffering: Converting from Image to BufferedImage


View user's profile Post To page top
msulli1355 Posted: Sat Apr 24, 2004 5:56 am


Joined: 17 Apr 2004

Posts: 28
Double-Buffering: Converting from Image to BufferedImage
How do you make a Buffered Image out of an Image? I`ve tried

BufferedImage bi = (BufferedImage) image;

I`ve tried

BufferedImage bi = Toolkit.getImage(filename.gif);

I`ve even tried

BufferedImage bi = new BufferedImage(image);

but none of it works. How do I do this?

-Michael Sullivan-
Reply with quote
Send private message
View user's profile Post To page top
nitrusrit Posted: Sat Apr 24, 2004 8:45 pm


Joined: 10 Apr 2004

Posts: 19
Double-Buffering: Converting from Image to BufferedImage
You can`t just convert an image into a buffered image. You`d have to get the
Graphics object from BufferedImage and use it to paint the original image onto
your bufferedimage.

Dustin

Michael Sullivan <michael@...> wrote:
How do you make a Buffered Image out of an Image? I`ve tried

BufferedImage bi = (BufferedImage) image;

I`ve tried

BufferedImage bi = Toolkit.getImage(filename.gif);

I`ve even tried

BufferedImage bi = new BufferedImage(image);

but none of it works. How do I do this?

-Michael Sullivan-


---------------------------------
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢

[Non-text portions of this message have been removed]
Reply with quote
Send private message
Post new topic Reply to topic
Display posts from previous:   
 

All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help