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

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

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