?
Solved

Copy of a BufferedImage object

Posted on 2003-03-02
2
Medium Priority
?
588 Views
Last Modified: 2010-05-18
How can I get exact copy of a BufferedImage object?
Also, can anyone please tell me the differences and advantages between BufferedImage and Image? When is the appropriate time to use the BufferedImage?

Thanx
0
Comment
Question by:asukai
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 200 total points
ID: 8053888
I'm not an expert on BufferedImage, a complex class, about which a respected writer of a book on Java2D graphics says a whole book could be written on it alone, but an obvious advantage of using BufferedImage gives you much more control over the constituents of the image.

You can clone an existing one by calling getSubimage(0, 0, image.getWidth(), image.getHeight())
0
 

Expert Comment

by:dpetersen112
ID: 22381978
getSubimage() returns a pointer to the data of the existing BI. Making a change to either changes both. I need a separate BI so that I can make changes (e.g., color) to one and not affect the other.
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month13 days, 10 hours left to enroll

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question