mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 18:51:28 +00:00
bug 63310 r=kmmclusk sr = buster. Fixes printing crash with images.
This commit is contained in:
parent
f6c22a683c
commit
5fdbf6a4c1
@ -1092,7 +1092,7 @@ UINT palType;
|
||||
nsresult
|
||||
nsImageWin::ConvertDDBtoDIB(PRInt32 aWidth, PRInt32 aHeight)
|
||||
{
|
||||
PRInt32 numbytes;
|
||||
PRInt32 numbytes,tWidth,tHeight;
|
||||
BITMAP srcinfo;
|
||||
HBITMAP oldbits;
|
||||
HDC memPrDC;
|
||||
@ -1106,10 +1106,13 @@ UINT palType;
|
||||
|
||||
numbytes = ::GetObject(mHBitmap,sizeof(BITMAP),&srcinfo);
|
||||
|
||||
tWidth = mBHead->biWidth;
|
||||
tHeight = mBHead->biHeight;
|
||||
|
||||
if (nsnull != mBHead){
|
||||
delete[] mBHead;
|
||||
}
|
||||
BuildDIB(&mBHead,mBHead->biWidth,mBHead->biHeight,srcinfo.bmBitsPixel,&mNumBytesPixel);
|
||||
BuildDIB(&mBHead,tWidth,tHeight,srcinfo.bmBitsPixel,&mNumBytesPixel);
|
||||
mRowBytes = CalcBytesSpan(mBHead->biWidth);
|
||||
mSizeImage = mRowBytes * mBHead->biHeight; // no compression
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user