What is the relationship between a BufferedImage and a RenderOP?

At present I am working on an app, and the purpose is to compare two pictures, make their difference a new image, then encode it to a JPEG stream.

Before, I used the BufferedImage to do this, but it seems to take a long time to grab the pixels information from the image(1024*768 about 60ms). Though processing the pixels just took 10ms, seeming very fast, trying to create a new BufferedImge was another hard job, taking about 100ms.

Because the time is very important in this project, I was suggested to use the JAI. It seems wonderful, for example, I can compare the two image through the xor method, and it is so fast. But another problem came out, it uses a different image type--RenderOP. And I am just wondering the relationship between it and the former BufferedImage. It seems as if I must at first change the BufferedImage to RenderOP. And using create method, it takes terribly 600ms, which is intolerable. Is there any better method? Because at first i must capture the desktop picture, the method in robot seems the only way to archieve it, and it return us a BufferedImage. So I must transform it into RenderOP to go on with the processing.

And another problem is about making the JPEG stream. Before, I used the method in com.sun.image.codec.jpeg which can process a BufferedImage, and just take 90ms. When I used the JAI's com.sun.media.jai.codec.ImageCodec, which processes a RenderOP, it took 300ms, terrible. Are the two method same? How could their efficiency differ so much? And I think the JAI should have a better effiiciency.

OK. Above is my problem, I was puzzled. I am wondering do we have a good method in the transforming between a BufferedImage and a RenderOP? And can I find a efficient way to achieve my goal in the project?And also do we have any other methods to capture a desktop?

Thanks so much.

(Above ms means millisecond)

[1907 byte] By [wayne329a] at [2007-9-23]
# 1
Sorry, there is no RenderOP in JAI....There is a javax.media.jai.RenderedOpjavax.media.jai.RenderableOpreading the javadoc for both of these almost made me puke there is so much stuff there. Good luck!@
jvaudrya at 2007-7-10 > top of java,Security,Cryptography...
# 2
Hello maby You will know how to detect how far pixel moved when comparing two JPEG images. I have two frames very simillar from a movie and I must calculate the avrage image and then put this image between two original images. please help if You have any idea how to do this
Himoa at 2007-7-10 > top of java,Security,Cryptography...