In continuation to find ways of comparing if images are equal I decided to try comparing them as byte arrays.
First we need to declare some library's. We will be using JRuby for these examples. If you want to use Java this will look simular.
Now we need to make a function that will allow us to open an image as a bufferedImage, and a function to convert image to a byte array.
Lastly we need a way to compare the 2 arrays to see if they are equal
Want to download the whole script checkout Github
- ► 2016 ( 13 )
- ▼ 2014 ( 14 )