for instance, i'd like to see something like a unix diff that i'll call myimdiff:
Code: Select all
$ myimdiff ref.png new.png
(12,34)
< RGB: 255 255 255
---
> RGB: 255 255 253
(56,78)
< RGB: 255 255 255
---
> RGB: 0 0 0
thanks
Code: Select all
$ myimdiff ref.png new.png
(12,34)
< RGB: 255 255 255
---
> RGB: 255 255 253
(56,78)
< RGB: 255 255 255
---
> RGB: 0 0 0
Do you want to detect the difference for only one given pixel coordinate or all different pixels in the image.sheepshearer wrote:when comparing two images, can anyone tell me how i might be able to list pixel differences?
for instance, i'd like to see something like a unix diff that i'll call myimdiff:
is anything like this possible?Code: Select all
$ myimdiff ref.png new.png (12,34) < RGB: 255 255 255 --- > RGB: 255 255 253 (56,78) < RGB: 255 255 255 --- > RGB: 0 0 0
thanks
Code: Select all
convert image1.png -depth 8 image1.txt
convert image2.png -depth 8 image2.txt
diff image1.txt image2.txt
Code: Select all
convert image1.png -depth 8 image1.txt
convert image2.png -depth8 image2.txt
diff image1.txt image2.txt
Code: Select all
$ diff ref.txt new.txt
1163c1163
< 3,3: (128, 11, 0, 79) #800B00B0 rgba(128,11,0,0.309804)
---
> 3,3: (255,255,255, 0) #FFFFFF white
1936c1936
< 4,5: (128, 11, 0, 79) #800B00B0 rgba(128,11,0,0.309804)
---
> 4,5: (255,255,255, 0) #FFFFFF white
1947c1947
< 15,5: (128, 11, 0, 79) #800B00B0 rgba(128,11,0,0.309804)
---
> 15,5: (255,255,255, 0) #FFFFFF white
2709c2709
< 5,7: (128, 11, 0, 79) #800B00B0 rgba(128,11,0,0.309804)
---
> 5,7: (255,255,255, 0) #FFFFFF white
2720c2720
< 16,7: (128, 11, 0, 79) #800B00B0 rgba(128,11,0,0.309804)
---
> 16,7: (255,255,255, 0) #FFFFFF white
3482c3482
< 6,9: (128, 11, 0, 79) #800B00B0 rgba(128,11,0,0.309804)
---
> 6,9: (255,255,255, 0) #FFFFFF white
3493c3493
< 17,9: (128, 11, 0, 79) #800B00B0 rgba(128,11,0,0.309804)
---
> 17,9: (255,255,255, 0) #FFFFFF white
4266c4266
< 18,11: (128, 11, 0, 79) #800B00B0 rgba(128,11,0,0.309804)
---
> 18,11: (255,255,255, 0) #FFFFFF white