Image difference position

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Cazeu64
Posts: 4
Joined: 2016-03-21T03:21:23-07:00
Authentication code: 1151

Image difference position

Post by Cazeu64 »

Hello !

Sorry about my english level in advance ! :D

I've done a script which compare two images, and give me back a third image with only differences :

Code: Select all

convert image_1.png image_2.png -alpha off +repage \( -clone 0 -clone 1 -compose difference -composite -threshold 0 \) \( -clone 0 -clone 2 -compose multiply -composite \) -delete 0,1 +swap -alpha off -compose copy_opacity -composite -trim +repage result.png
It work fine.

But I need to get the position of the third image. Where the difference where found ?

I didn't find anything about.

Thanks in advance,

Have a nice day !
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Image difference position

Post by snibgo »

I'm not sure what you want. Perhaps "+write info:" before the final repage will do it.
snibgo's IM pages: im.snibgo.com
Cazeu64
Posts: 4
Joined: 2016-03-21T03:21:23-07:00
Authentication code: 1151

Re: Image difference position

Post by Cazeu64 »

Nice, it's what I was looking for !

Thanks a lot, I was stuck on this issue.

Have a nice day,

Guillaume :).
Post Reply