I built a community website where the users upload their photo and they can crop the thumbnail, ala Facebook to be clear.
But for some reason some of them generate a blank (actually black jpeg thumbnail).
I tried different solutions but it sounds like this is happening with big images or maybe in computers where JS is not enabled? I don't know...
Bottom line, since the number of users with this is very tiny, I was thinking of creating a patch: detect when the user generates a blank jpeg.Then I would be able to warn them.
Do you know how to do it?
Resize it to a 1x1 PX image. Then check if the one pixel is black. Not perfect, but if there is a significant amount of non black in the original, that 1px will not be black. The benefit is that it will be fast.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With