Hello!
I have been trying to make a piece of code, that will allow me to adjust the contrast of an image.
Earlier I found a fast and easy way using matrix to adjust
brightness, and I really need a similar system for the contrast.
What I have found until now is either working way too slow (adjusting a pixel at a time) or seem to be a variation of brightness adjustment(?) like this:
float[][] wk_colormatrix ={
new float[] {wk_float, 0, 0, 0, 0},
new float[] {0, wk_float, 0, 0, 0},
new float[] {0, 0, wk_float, 0, 0},
new float[] {0, 0, 0, 1, 0},
new float[] {wk_float_x, wk_float_x, wk_float_x, 0, 1}
};
My experience tell me, that if I can't find what I need on the internet, it's either impossible, or so easy and simple that no one ever needed to ask about it ;-)
However, it is obviously possible, since it works great int i.e. Paint.net, where I can adjust contrast of an image "on the fly" so to speak!
So, I've decided to throw in the towel: Anything that can help me here will be more than welcome!
Sincerely/Best regards
Mads Kristian