Reduce the threshold for images to be considered black:in the wild it has happened that borderline-legitimate pictures of 7kbytes have triggered the check.
Avoid the not portable limit idiom, just kill the recursive part using the flag instead...although one should point out that Oracle does not support the boolean type...