I have a picture, and I get every pixels and multiply the RGB for a number. I also need to take care when R * number > 255. When this happen, r = 255.
It’s taking about 10s+ to complete a 1024×768 image. The common softwares that do brightness, takes less than 1s to do it. Any ideias to improve my strategy? Thanks.
I have a picture, and I get every pixels and multiply the RGB for
Share
I had a similar problem:
How to use ColorMatrix in .NET to change Brightness, Color, Saturation, Hue
For brightness alone, colormatrix will work fine. If you want to start using contrast, etc, you will need to use some other solution. It seems to be SetPixel is the slowest part. See this solution for doing this quickly:
http://www.codeproject.com/KB/GDI-plus/csharpgraphicfilters11.aspx