File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Image Processiong using Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Image Processiong using Java" Watch "Image Processiong using Java" New topic
Author

Image Processiong using Java

Amol Pingate
Greenhorn

Joined: Oct 02, 2008
Posts: 14
Hello Frirnds,

Is it possible to identify that two image files like .JPEG or .BMP are equal by checking them pixel by pixel.


Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 20049
    
  30

Check out java.awt.image.BufferedImage and javax.imageio.ImageIO.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12982
    
    5
I doubt very much that they would ever be equal since JPG is inherently lossy while BMP is not.

Bill
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 20049
    
  30

But once loaded in memory, you can still compare the two. The results may not be what you expect, but you can still compare pixels (as ARGB values).
 
 
subject: Image Processiong using Java
 
jQuery in Action, 3rd edition