This commit is contained in:
Brian R. Bondy 2012-07-21 13:57:35 -04:00
Родитель 343d8a43ac
Коммит 3c81b9ea78
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -137,6 +137,8 @@ nsICODecoder::FixBitmapHeight(PRInt8 *bih)
PRInt32 height;
memcpy(&height, bih + 8, sizeof(height));
height = LITTLE_TO_NATIVE32(height);
// BMPs can be stored inverted by having a negative height
height = abs(height);
// The bitmap height is by definition * 2 what it should be to account for
// the 'AND mask'. It is * 2 even if the `AND mask` is not present.