Re: [gentoo-user] diff command for images
You could also try the pamarith comand of the netpbm package. It has both -subtract and -difference ralf -- gentoo-user@lists.gentoo.org mailing list
Re: [gentoo-user] diff command for images
On Sun, Jan 27, 2008 at 02:54:15PM +0100, Penguin Lover Erik squawked: > I need to find the difference between images (like the text-file diff > command, but for RGBA images). I tried "compare A.png A.png > difference.png". This should obviously produce some kind of blank image > because A.png and A.png are the same file, but for some weird reason the > produced difference.png has recognizable content! Is there a fix for > that bug or any other image diff program that is sane? It seems that you do not understand how the compare function works http://www.imagemagick.org/script/compare.php The output image is the second image overlaid with a red "mask". The pixels that are tinted red in the output shows the pixels that differ from the original one. The ones that are not tinted red are unchanged. So if you compare A to A, you will get something that looks like A tinted by white. What you want is something like composite A.jpg -compose minus A.jpg Out.jpg Look at http://www.imagemagick.org/script/command-line-options.php#compose to see what composite operators you can use for doing the comparison. W -- Heineken (/hnkt/)... since the second millennium B.C., middle kingdom. ' ' Sortir en Pantoufles: up 415 days, 16:27 -- gentoo-user@lists.gentoo.org mailing list
Re: [gentoo-user] diff command for images
Am Sonntag, 27. Januar 2008 schrieb Erik: > I tried "compare A.png A.png difference.png". This should obviously produce > some kind of blank image > because A.png and A.png are the same file, but for some weird reason the > produced difference.png has recognizable content! Try "compare -metric AE A.png A.png difference.png" This gives you the absolute number of diffrent pixels. http://www.imagemagick.org/script/command-line-options.php#metric Regards Jens -- gentoo-user@lists.gentoo.org mailing list
Re: [gentoo-user] diff command for images
Elias Probst skrev: > Am Sonntag, 27. Januar 2008 14:54:15 schrieb Erik: > >> I need to find the difference between images (like the text-file diff >> command, but for RGBA images). I tried "compare A.png A.png >> difference.png". This should obviously produce some kind of blank image >> because A.png and A.png are the same file, but for some weird reason the >> produced difference.png has recognizable content! Is there a fix for >> that bug or any other image diff program that is sane? >> > The easiest way for doing this, is using GIMP. > - Use one layer for each image > - Use the 'Subtract' mode for displaying the second layer > Not sure how to do this. I am not a graphic artist. But I just open it with "gimp a.png b.png" and press Ctrl-C in one image, switch to the other and press Ctrl-V. That seems to create a second layer. Then I have no idea what to do. A simple command would be useful. I might have to regression-test 1000 images in a svn commit because some of them seem to have been modified by optipng. -- gentoo-user@lists.gentoo.org mailing list
Re: [gentoo-user] diff command for images
Am Sonntag, 27. Januar 2008 14:54:15 schrieb Erik: > I need to find the difference between images (like the text-file diff > command, but for RGBA images). I tried "compare A.png A.png > difference.png". This should obviously produce some kind of blank image > because A.png and A.png are the same file, but for some weird reason the > produced difference.png has recognizable content! Is there a fix for > that bug or any other image diff program that is sane? The easiest way for doing this, is using GIMP. - Use one layer for each image - Use the 'Subtract' mode for displaying the second layer Regards, Elias P. -- A really nice number: "09:F9:11:02:9D:74:E3:5B:D8:41:56:C5:63:56:88:C0" signature.asc Description: This is a digitally signed message part.
[gentoo-user] diff command for images
I need to find the difference between images (like the text-file diff command, but for RGBA images). I tried "compare A.png A.png difference.png". This should obviously produce some kind of blank image because A.png and A.png are the same file, but for some weird reason the produced difference.png has recognizable content! Is there a fix for that bug or any other image diff program that is sane? -- gentoo-user@lists.gentoo.org mailing list