[ros-dev] [ros-diffs] [jimtabor] 37766: - Sync in rev 37720: Magnus Olsen, add GdiGetBitmapBitsSize is a new api from windows xp sp3, the code was tested in vs2003.
Aleksey Bragin
aleksey at reactos.org
Sun Nov 30 15:43:32 CET 2008
Instead of copying the whole formula, it could be done as
ULONG Height;
if (lpbmi->bmiHeader.biHeight >=0 )
Height = lpbmi->bmiHeader.biHeight;
else
Height = -lpbmi->bmiHeader.biHeight;
retSize = Height * ((lpbmi->bmiHeader.biWidth *
lpbmi->bmiHeader.biPlanes * lpbmi-
>bmiHeader.biBitCount + 31) & -32) / 8;
Also comments contain typos
/* Make height postiive if it negitve then calc the bits Size and
align it*/
postiive, negitive
WBR,
Aleksey.
On Nov 30, 2008, at 4:17 PM, jimtabor at svn.reactos.org wrote:
> Author: jimtabor
> Date: Sun Nov 30 07:17:19 2008
> New Revision: 37766
> + if (lpbmi->bmiHeader.biHeight >=0 )
> + {
> + /* Calc the bits Size and align it*/
> + retSize = lpbmi->bmiHeader.biHeight * ((lpbmi-
> >bmiHeader.biWidth *
> + lpbmi->bmiHeader.biPlanes * lpbmi-
> >bmiHeader.biBitCount + 31) & -32) / 8;
> + }
> + else
> + {
> + /* Make height postiive if it negitve then calc
> the bits Size and align it*/
> + retSize = (-lpbmi->bmiHeader.biHeight) * ((lpbmi-
> >bmiHeader.biWidth *
> + lpbmi->bmiHeader.biPlanes * lpbmi-
> >bmiHeader.biBitCount + 31) & -32) / 8;
> + }
More information about the Ros-dev
mailing list