Is it possible with PHP (alternatively JS or something similiar) to detect if an image has a mostly white background?
It is because where I display my images there's a white background. And some images have a dark or colorful background, but some are white or mostly white. And I have a css class called
img-shadow that adds a shadow to an image. So I would like to add that only if the background of an image is white or mostly white.
Here's an example to show you what I mean: