"Mikolaj Zalewski" mikolajz@google.com writes:
@@ -1600,6 +1603,16 @@ #endif for(; y >= y2; y--) { memcpy(dstbits, (char *)dib.dsBm.bmBits + y * dib.dsBm.bmWidthBytes + xSrc * 4, widthSrc * 4);
if (!(blendfn.AlphaFormat & AC_SRC_ALPHA))
{
int i;
RGBQUAD *quad = (RGBQUAD *)dstbits;
for (i = 0; i < widthSrc; i++)
{
quad->rgbReserved = blendfn.SourceConstantAlpha;
quad++;
}
}
It would be nicer to have a separate loop for that case, and do everything in one go instead of patching up the values after the copy. Also RGBQUAD is meant for color tables, it's not an appropriate type for the bitmap data itself.