image - Silverlight 4.0 - contrast and brightness management -


i building image editor silverlight 4.0 , need insight or possibly snippet of code or library implement contrast/brightness management.

i appreciate if share how can achieved.

thanks!

contrast how "wide" swath of pixel brightness values present, out of total range of values possible.

brightness "offset" of swath minimum possible level.

to increase contrast, subtract (smallest present value - smallest possible value) pixel values put swath @ 0. multiply values (max possible value / max value present ) scale "swath" range of possible values.

to adjust brightness, add or subtract absolute value each pixel.

you want luminance or value channel in hsl or hsv colorspace.

i found code here. http://www.dfanning.com/ip_tips/contrast.html


Comments

Popular posts from this blog

unicode - Are email addresses allowed to contain non-alphanumeric characters? -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

c++ - Convert big endian to little endian when reading from a binary file -