I have a site that uses large background images, uploaded by the user, that has content on top of it.

I'd like to be able to analyze the image and apply a class to the body that will have black text if the brightness of the image is very light, and white text on a dark background.

I think having it populate a meta field attached to the image with the analyzation results upon upload would be the easiest, but haven't found anything that does that sort of sorcery.

How would one apply such an analysis to the image meta upon upload?

  • Or you can simply put a semi-transparent overlay on top of the image where the text sits on top so it is legible. – user23654 Sep 2 '13 at 23:39
  • Ya, that would be the easiest way, but it isn't the look I'm going for. – Picard102 Sep 3 '13 at 0:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.