Posted: 2006-11-06T13:38:41-07:00
A grayscale image returns a colorspace of gray with the identify -verbose command.
Use https://github.com/ImageMagick/ImageMagick/discussions instead.
https://imagemagick.com/discourse-server/
https://imagemagick.com/discourse-server/viewtopic.php?t=7744
Code: Select all
convert capitol.jpg \( +clone -colorspace gray \) \
-compose difference -composite \
-colorspace gray -verbose info: | grep 'Mean:'
Code: Select all
Mean: 2658.12 (0.0405603)
Code: Select all
convert black-and-white-photographs-3003.jpg \( +clone -colorspace gray \) \
-compose difference -composite \
-colorspace gray -verbose info: | grep 'Mean:'
Code: Select all
Mean: 0 (0)