mirror of
https://github.com/reactos/reactos.git
synced 2024-10-15 05:37:44 +00:00
Fix math and add notes.
svn path=/trunk/; revision=28501
This commit is contained in:
parent
c2de09f61a
commit
f7da3af16d
|
@ -3,7 +3,7 @@
|
|||
/*
|
||||
* Return the full scan size for a bitmap.
|
||||
*
|
||||
* Based on Wine and Windows Graphics Prog pg 595
|
||||
* Based on Wine, Utils.c and Windows Graphics Prog pg 595
|
||||
*/
|
||||
UINT
|
||||
FASTCALL
|
||||
|
@ -20,10 +20,10 @@ DIB_BitmapMaxBitsSize( PBITMAPINFO Info, UINT ScanLines )
|
|||
{
|
||||
if ((Info->bmiHeader.biCompression) && (Info->bmiHeader.biCompression != BI_BITFIELDS))
|
||||
return Info->bmiHeader.biSizeImage;
|
||||
// Planes are over looked by Yuan. I guess assumed always 1.
|
||||
MaxBits = Info->bmiHeader.biBitCount * Info->bmiHeader.biPlanes * Info->bmiHeader.biWidth;
|
||||
}
|
||||
// Planes are over looked by Yuan. I guess assumed always 1.
|
||||
MaxBits = (MaxBits + 31) / 32; // ScanLineSize = (Width * bitcount + 31)/32
|
||||
MaxBits = ((MaxBits + 31) & ~31 ) / 8; // From Yuan, ScanLineSize = (Width * bitcount + 31)/32
|
||||
return (MaxBits * ScanLines); // ret the full Size.
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue