зеркало из https://github.com/mozilla/gecko-dev.git
Bug 682688 - FF6 Fix for moz-icon invalid generated icons. r=joe
This commit is contained in:
Родитель
67d155be54
Коммит
ab13ed1624
|
@ -452,10 +452,15 @@ static int GetColorTableSize(BITMAPINFOHEADER* aHeader)
|
|||
}
|
||||
case 16:
|
||||
case 32:
|
||||
if (aHeader->biCompression == BI_RGB)
|
||||
// If we have BI_BITFIELDS compression, we would normally need 3 DWORDS for
|
||||
// the bitfields mask which would be stored in the color table; However,
|
||||
// we instead force the bitmap to request data of type BI_RGB so the color
|
||||
// table should be of size 0.
|
||||
// Setting aHeader->biCompression = BI_RGB forces the later call to
|
||||
// GetDIBits to return to us BI_RGB data.
|
||||
if (aHeader->biCompression == BI_BITFIELDS)
|
||||
aHeader->biCompression = BI_RGB;
|
||||
colorTableSize = 0;
|
||||
else if (aHeader->biCompression == BI_BITFIELDS)
|
||||
colorTableSize = 3 * sizeof(DWORD);
|
||||
break;
|
||||
case 24:
|
||||
colorTableSize = 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче