I know how to do simple things with images at the pixel level like applying grayscale, sepia, etc. I'd like to find some articles on how to apply saturation, hue, brightness, contrast, etc at the pixel level, and I'm having trouble getting anything useful from my google searches.
+1
A:
Since pixels are usually represented as RGB (red, green, blue) values, it's often more useful to convert them to another color space to manipulate them, e.g. HSB (Hue, Saturation, Brightness) - that way you can change those values individually more easily.
If you search for RGB to HSB conversion you should find examples of how to do it (I think I found some useful code on Wikipedia).
Obviously after you've manipulated the pixels (e.g. multiplying the saturations by 0.2) you then have to convert them back to RGB for display.
andrewmu
2010-10-13 15:07:09
awesome...didn't think of it that way. I know that photoshop displays colors in three or four different formats, but I didn't think to simply do that same conversion and edit it like that. Now that I think about it, it's a pretty obvious solution. Thanks!
Rich
2010-10-13 15:31:49