jimp icon indicating copy to clipboard operation
jimp copied to clipboard

Detect Brightness / Bright Image

Open kingkong404 opened this issue 3 years ago • 1 comments

I'm trying to create a smart invert feature where given an image, if that image is bright it will invert it to make it dark and if its already dark leave it alone.

Is there a way to read the current brightness of an image overall?

The images im trying to invert are typically on a off white background or a dark grey background. So differentiating them should be striaght forward.

Thanks in advance for any help.

kingkong404 avatar Apr 17 '21 13:04 kingkong404

Hope, this can help you ) https://stackoverflow.com/questions/38211798/detect-if-image-is-dark-light-and-addclass-dark-light-to-parent

uaKorona avatar Sep 02 '22 14:09 uaKorona