Board index » delphi » Brightness/Contrast?

Brightness/Contrast?

Does anyone have information on altering brightness/contrast on a 24bit
bitmap?  I found a Coloradjust API, but it only seems to work with
8bit.  I can do a 'Lighten' by just incrementing the separate R,G,B
values.  I have tried incrementing the same rgb values by a percentage,
which is a little better, but I still get 'washout'.  Do I need to
convert to HSV or HLS?  Any online resources you're aware of?  Thanks,

--
Harm  (remove thebaragain for email)

"Two major products came out of Berkely in the 70's;
Unix and LSD.  It's not a coincidence."

 

Re:Brightness/Contrast?


RGB is the format where red, green and blue are separated.
HSV is the format where hue, saturation and something else
is separated. I think the saturation is the one you want to adjust.

Rene

Quote
Harm wrote:

> Does anyone have information on altering brightness/contrast on a 24bit
> bitmap?  I found a Coloradjust API, but it only seems to work with
> 8bit.  I can do a 'Lighten' by just incrementing the separate R,G,B
> values.  I have tried incrementing the same rgb values by a percentage,
> which is a little better, but I still get 'washout'.  Do I need to
> convert to HSV or HLS?  Any online resources you're aware of?  Thanks,

> --
> Harm  (remove thebaragain for email)

> "Two major products came out of Berkely in the 70's;
> Unix and LSD.  It's not a coincidence."

Re:Brightness/Contrast?


I'm no Delphi Guru, but I can tell you as a graphic designer what I believe
is going on with Brightness/Contrast:  Brightness IS indeed a simultaneous
adjustment of each RGB value in equal increments (if they're unequal,
you're adjusting color HUE).

Contrast though, is the "movement" of middle values toward extremes, ie., a
51% gray will become darker and a 49% gray will become lighter if you set
your threshold in the middle.

HSB (Hue, Saturation, Brightness) Involves adjustment of an image in
different ways...when Hue is adjusted, a single channel (the Red, for
example, in an RGB image) is manipulated while the relative light/dark
values are maintained (a red apple can become green, but greyscale images
of either would look similar). Adjustment to SATURATION involves the
addition of a neutral value grey to the color. Brightness involves the
addition of white, or, like I mentioned earlier, it is the linear, equal
adjustment of all channels.

As to implementing the theory in Dephi...There's a site you should know of;
the gentleman who runs the show there really seems to know his stuff: EGC
Computer lab, at
http://www.infomaster.net/external/efg/index.htm

Hope this helps.
Kevn

Other Threads