C# Changing the hue with a colormatrix?
I'm trying to emulate the color picker in photoshop. I have a 256x256 bitmap gradient that has saturation on X-axis and brightness on Y-axis. As I vary 开发者_如何学Pythonthrough the values 0 to 360, the bitmap changes hue accordingly.
I have it working for the most part but I'm using a function that changes each pixel from HSV to RGB values and then assigning the values into the bitmap (using pointers) but it kinda flickers when I change the values quickly. Is it possible to change the hue by scaling a bitmap with a ColorMatrix?
I believe ColorMatrix (http://msdn.microsoft.com/en-us/library/system.drawing.imaging.colormatrix.aspx) only apply in ARGB space, so you can't simply adjust hue with them.
Although it does not strictly answer your question. You could eliminate the flicker by disabling refresh while updating.
精彩评论