Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Given an image, I want to detect whether it has any non-white pixels (basically anything that's not #FFFFFF). Any transparent pixels should also be ignored.
Is there a way to do this, maybe somehow parsing the data given from the code below?
What do you mean by "detect"? Do you just want to know if there are any non-white pixels or any transparent pixels? Or do you need the locations of every one?
Please always provide your IM version and platform, since syntax may differ.
An image will have non-white pixels if the mean value is not 1 in the following.
Assuming your are not using HDRI, simply find the minimum pixel value: %[fx:minima]. If this isn't #ffffff or whatever your Q is, all the pixels are white.