Jinoh Kang (@iamahuman) commented about dlls/gdiplus/image.c:
- screendc = CreateCompatibleDC(0);
- GetDIBits(screendc, iinfo.hbmColor, 0, height, lockeddata.Scan0, (BITMAPINFO*)&bih, DIB_RGB_COLORS);
- if (bm.bmBitsPixel == 32)
- bits = heap_alloc(height * stride);
- if (!bits) {
has_alpha = FALSE;/* If any pixel has a non-zero alpha, ignore hbmMask */src = (DWORD*)lockeddata.Scan0;for (y=0; y<height && !has_alpha; y++)for (x=0; x<width && !has_alpha; x++)if ((*src++ & 0xff000000) != 0)has_alpha = TRUE;
We should have a test covering this so we know we don't have a regression here.