I have 8000 images and essentially need to delete any photo that has a white background. I'm hoping to find a way I can sort all of these images by the dominant color (which would hopefully be white), or by the background colour, lets say the top left pixel.
Can this be achieved with imagemagick?
You could just compute the percentage of white pixels in the image using ImageMagick?
convert image -fuzz XX% -fill white -opaque white -fill black +opaque white -scale 1x1 -format "%[fx:100*mean]\n" info:
The result will be the percentage of white in your image.
Where XX% is the percent tolerance for how close to white you want to consider as white. If you want only pure white, then use 0%. If you want to include near white, then increase XX%.
PS Sorry @emcconville, we must have posted about the same time. Mostly the same solution, but yours is more thorough regarding sorting.