After I was a toddler, I beloved in search of Waldo within the “The place’s Waldo?” ebook sequence. Lately I am a sucker for TMZ’s “What is the Massive Frigin Distinction” photographs, the place TMZ barely adjustments a picture and it’s a must to spot the variations between the 2. That received me to pondering — how simply might I automate diff’ing two photographs? This StackOverflow put up was gold.
To create a diff of two comparable photographs, we’ll use ImageMagick’s convert
command line utility with a big host of configurations:
convert '(' image1.png -flatten -grayscale Rec709Luminance ')' '(' image2.png -flatten -grayscale Rec709Luminance ')' '(' -clone 0-1 -compose darken -composite ')' -channel RGB -combine diff.png
How efficient is that this command with its configuration arguments? Let’s take a look:
Unique Picture

Modified Picture

Diff’ed Picture

The diff picture result’s fairly informative! The dimensions of the sun shades is clearly introduced, and in case you look intently, you possibly can see one cranium on the top-right of the shirt has been flipped.
No matter your motive for eager to establish the distinction two photographs, ImageMagick’s convert
device is spectacular. You’ll be able to do one million issues with ImageMagick; take a look at my Media tutorials to study extra superior methods to change photographs, movies, and audio!
HTML5 obtain Attribute
I are likely to get caught up on the JavaScript aspect of the HTML5 revolution, and might you blame me? HTML5 offers us superior “huge” stuff like WebSockets, Internet Employees, Historical past, Storage and little helpers just like the Factor classList assortment. There are, nonetheless, smaller options in…
After I was a toddler, I beloved in search of Waldo within the “The place’s Waldo?” ebook sequence. Lately I am a sucker for TMZ’s “What is the Massive Frigin Distinction” photographs, the place TMZ barely adjustments a picture and it’s a must to spot the variations between the 2. That received me to pondering — how simply might I automate diff’ing two photographs? This StackOverflow put up was gold.
To create a diff of two comparable photographs, we’ll use ImageMagick’s convert
command line utility with a big host of configurations:
convert '(' image1.png -flatten -grayscale Rec709Luminance ')' '(' image2.png -flatten -grayscale Rec709Luminance ')' '(' -clone 0-1 -compose darken -composite ')' -channel RGB -combine diff.png
How efficient is that this command with its configuration arguments? Let’s take a look:
Unique Picture

Modified Picture

Diff’ed Picture

The diff picture result’s fairly informative! The dimensions of the sun shades is clearly introduced, and in case you look intently, you possibly can see one cranium on the top-right of the shirt has been flipped.
No matter your motive for eager to establish the distinction two photographs, ImageMagick’s convert
device is spectacular. You’ll be able to do one million issues with ImageMagick; take a look at my Media tutorials to study extra superior methods to change photographs, movies, and audio!
HTML5 obtain Attribute
I are likely to get caught up on the JavaScript aspect of the HTML5 revolution, and might you blame me? HTML5 offers us superior “huge” stuff like WebSockets, Internet Employees, Historical past, Storage and little helpers just like the Factor classList assortment. There are, nonetheless, smaller options in…