Escrevendo minha própria resposta, desde que descobri. Bem, parece funcionar com as minhas imagens de teste. É explicado nos comentários.
#!/bin/sh
#Tests whether an image is uniform (ie a simple repeated pattern or a single colour.)
#The logic is as follows:
# - convert the image to an 8x8 px temp BMP image.
#(we need to use bitmaps because we need exact pixel values
#with no random compression artifacts)
# - convert THAT to a 1x1 px BMP image
# - convert the 1 px image back to an 8x8 px BMP image.
#If the first 8x8 image is the same (according to 'diff')
#as the scaled-to-1px-and-back-again image,
#then we can conclude that the first 8x8 image was totally uniform,
#(ie every pixel exactly the same)
#and from this we can conclude that the original full size image
#was also uniform: not necessarily the same colour in every pixel,
#but not varied enough for our requirements.
source=$1
small1=/tmp/small_image.bmp
small2=/tmp/small_image2.bmp
tiny=/tmp/tiny_image.bmp
#the \! after 8x8 tells it to ignore the aspect ratio and just squash it to those dimensions
convert "$source" -resize 8x8\! "$small1"
convert "$small1" -resize 1x1 "$tiny"
convert "$tiny" -resize 8x8 "$small2"
diff "$small1" "$small2" > /dev/null
result=$?
if [ $result -eq 0 ]; then
#diff gives an empty return, so the files are the same, which means there wasn't variation
echo "Image is uniform" >&1
else
#we found a difference between the pre-squashed and resized versions which means there WAS variation
echo "Image is not uniform" >&1
fi