зеркало из https://github.com/mozilla/gecko-dev.git
Fixed DuplicateImage() code to copy alpha bits properly
This commit is contained in:
Родитель
2767248cf9
Коммит
11b254d1e9
|
@ -825,11 +825,11 @@ nsImageWin *theimage;
|
|||
|
||||
|
||||
// bits of the alpha mask
|
||||
num = theimage->mAlphaWidth*theimage->mAlphaHeight;
|
||||
if(num>0)
|
||||
num = theimage->mARowBytes * theimage->mAlphaHeight;
|
||||
if(num > 0)
|
||||
{
|
||||
theimage->mAlphaBits = new unsigned char[num];
|
||||
memcpy(theimage->mImageBits,this->mImageBits,theimage->mSizeImage);
|
||||
memcpy(theimage->mAlphaBits,this->mAlphaBits,num);
|
||||
}
|
||||
else
|
||||
theimage->mAlphaBits = nsnull;
|
||||
|
|
Загрузка…
Ссылка в новой задаче