show only difference using imagemagick compare -


i'm using imagemagick compare compare 2 images , diff. have 2 questions:

  1. i want transparent result image diff parts, nothing else. not white - transparent.
  2. is possible diff of 1 image instead of both ?

thanks!

let's suppose start these 2 images:

convert -size 256x256 xc:black -fill white -draw "circle 100,100 120,100" a.png 

enter image description here

and

convert -size 256x256 xc:black -fill white -draw "circle 120,120 140,140" b.png 

enter image description here

then can differences in red on transparent background this:

compare a.png b.png -highlight-color red -lowlight-color none -compose src diff.png 

enter image description here

i have overlaid onto checkerboard photoshop can see checkerboard through transparency.

as regards second question, have no idea how can difference between single image? difference what?


Comments