locked
Detecting the 'brightness' of an image RRS feed

  • Question

  • User-1590375683 posted

    Need help figuring out a pattern for determining how 'bright' and image is.  My challenge is that I want to place a text watermark, if the image is 'dark' I want to use a lighter font, if the image is 'light' I want to use a darker font.

    I just can't figure out a metric for determining 'lightness' or 'darkness'.

    Make sense?

    Wednesday, February 20, 2008 2:32 PM

Answers

All replies

  • User437720957 posted

    Use the RGB values and calculate an average, using different weights for R, G and B.

    http://gimp-savvy.com/BOOK/index.html?node52.html

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 20, 2008 5:21 PM
  • User-1535631749 posted

    Hi all,

    Can anybody help me to give the effect on image like highlight,temprature,Exposure in c#?

    Thanks in Advance..

    Friday, June 20, 2008 11:53 AM