I have a 'Bitmap' type containing some random bitmap data. I've written my own adjustments for Brightness, Color, Saturation, and Hue that act on each bit individually and, unsurprisingly, it's awful slow.
In my research I've noticed that using matrices can be very fast in adjusting these. In addition, .NET has a ColorMatrix where you can apply the matrix effects when you DrawImage().
The matrix we set up looks like the following (from MSDN website):
float[][] colorMatrixElements = {
new float[] {2, 0, 0, 0, 0}, // red scaling factor of 2
new float[] {0, 1, 0, 0, 0}, // green scaling factor of 1
new float[] {0, 0, 1, 0, 0}, // blue scaling factor of 1
new float[] {0, 0, 0, 1, 0}, // alpha scaling factor of 1
new float[] {.2f, .2f, .2f, 0, 1}}; // three translations of 0.2
But I haven't been able to find proper ranges or what exactly any of these numbers actually do. I have no idea how to adjust for Brightness, Color, Saturation, and Hue.
Any help?? Am I missing some good documentation somewhere?
Thanks!!