|
Advice I have the following code to deepen the brightness of pixels in an area
The efficiency of actual execution is too slow.A better solution is required.
COLORREF rgb;
BYTE r, g, b;
for (UINT x = 0; x <xMax; x ++)
{
for (UINT y = 0; y <yMax; y ++)
{
rgb = GetPixel (x, y);
r = GetR (rgb);
g = GetG (rgb);
b = GetB (rgb);
r + = 20; g + = 20; b + = 20; // The overflow problem need not be considered ... small hidden dangers ...
SetPixel (x, y, RGB (r, g, b);
}
} |
|