This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
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 Elasticsearch in Action this week in the Big Data 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: 19911
    
  23

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


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

Joined: Mar 22, 2000
Posts: 12892
    
    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: 19911
    
  23

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).
 
Consider Paul's rocket mass heater.
 
subject: Image Processiong using Java