what is the formula of increasing the brightness of a bitmap? i m working in MFC
+3
A:
In broad terms, one method is to convert the RGB value each pixel to a different model like HSV, make the brightness adjustment, then convert it back to RGB
Practically speaking, check out this CBitmapEx class from The Code Project.
Paul Dixon
2010-06-20 17:09:31
is there any other easy method? i have heard that it can be done by averaging color pixels. like bw=(r+g+b)/3 but where should we place this bw in this dc.SetPixel(x, y, RGB(r, g, b));
Sweety Khan
2010-06-20 17:37:55
There is nothing really "simple" about accurate color adjustments. In general, I've found the easiest way is to find a good library that does what you want and use it. Paul's suggestion of CBitmapEx is a good place to start. If you really want to understand how to do it, you can review the library code if you are using an open source one.
photo_tom
2010-06-20 23:04:24