зеркало из https://github.com/mozilla/pjs.git
Bug 84980 - zero out the color components of transparent pixels
in a binary alpha PNG on win32 before handing them off to libpr0n. r=pavlov, sr=brendan
This commit is contained in:
Родитель
102be04d62
Коммит
128c2775c3
|
@ -453,11 +453,21 @@ row_callback(png_structp png_ptr, png_bytep new_row,
|
||||||
#ifdef XP_MAC
|
#ifdef XP_MAC
|
||||||
*cptr++ = 0;
|
*cptr++ = 0;
|
||||||
#endif
|
#endif
|
||||||
*cptr++ = *line++;
|
if (line[3]) {
|
||||||
*cptr++ = *line++;
|
*cptr++ = *line++;
|
||||||
*cptr++ = *line++;
|
*cptr++ = *line++;
|
||||||
if (*line++) {
|
*cptr++ = *line++;
|
||||||
aptr[x>>3] |= 1<<(7-x&0x7);
|
aptr[x>>3] |= 1<<(7-x&0x7);
|
||||||
|
line++;
|
||||||
|
} else {
|
||||||
|
#ifdef XP_WIN
|
||||||
|
*cptr++ = 0;
|
||||||
|
*cptr++ = 0;
|
||||||
|
*cptr++ = 0;
|
||||||
|
#else
|
||||||
|
cptr += 3;
|
||||||
|
#endif
|
||||||
|
line += 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
decoder->mFrame->SetAlphaData(decoder->alphaLine, abpr, row_num*abpr);
|
decoder->mFrame->SetAlphaData(decoder->alphaLine, abpr, row_num*abpr);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче