Is the image all Black?

is there an automated way that anyone knows of to quickly analyze an image and say whether or not its is 100% black or not?

thanks,

ryan