This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons 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: 19654
    
  18

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: 12761
    
    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: 19654
    
  18

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).
 
jQuery in Action, 2nd edition
 
subject: Image Processiong using Java
 
Similar Threads
how to encrypt data into an image
image processing in java
reading an image file
updating an image with a new color and or content
Support for PNG in Browsers