src/leptwin.c
static DWORD
ImageBitsSize(HBITMAP hBitmap)
{
    DIBSECTION  ds;

    GetObject(hBitmap, sizeof(DIBSECTION), &ds);
    switch( ds.dsBmih.biCompression )
    {
    case BI_RLE8:  /* wrong if haven't called DSCreateDIBSection or
                    * CreateDIBSection with this pbmi */
    case BI_RLE4:
        return ds.dsBmih.biSizeImage;
        break;
    default:  /* should not have to use "default" */
    case BI_RGB:
    case BI_BITFIELDS:
        return BYTESPERLINE(ds.dsBmih.biWidth, \
                            ds.dsBmih.biBitCount * ds.dsBmih.biPlanes) *
                            ds.dsBmih.biHeight;
        break;
    }
    return 0;
}
/* **********************************************************************
  DWORD ImageBitsSize(HBITMAP hbitmap)

  PARAMETERS:
    HBITMAP - hbitmap

  RETURNS:
    DWORD    - the size, in bytes, of the HBITMAP's image bits
    
  REMARKS:
    Calculates and returns the size, in bytes, of the image bits for
    the DIB described by the HBITMAP.
********************************************************************** */
DWORD ImageBitsSize(HBITMAP hbitmap)
PARAMETERS:
HBITMAP - hbitmap

DWORD    - the size, in bytes, of the HBITMAP's image bits

Calculates and returns the size, in bytes, of the image bits for
the DIB described by the HBITMAP.
DWORD ImageBitsSize ( HBITMAP hbitmap ) PARAMETERS : HBITMAP - hbitmap DWORD - the size in bytes of the HBITMAP ' s image bits Calculates and returns the size in bytes of the image bits for the DIB described by the HBITMAP .
static DWORD
ImageBitsSize(HBITMAP hBitmap)
{
    DIBSECTION  ds;
    GetObject(hBitmap, sizeof(DIBSECTION), &ds);
    switch( ds.dsBmih.biCompression )
    {
    case BI_RLE8:  
    case BI_RLE4:
        return ds.dsBmih.biSizeImage;
        break;
    default:  
    case BI_RGB:
    case BI_BITFIELDS:
        return BYTESPERLINE(ds.dsBmih.biWidth, \
                            ds.dsBmih.biBitCount * ds.dsBmih.biPlanes) *
                            ds.dsBmih.biHeight;
        break;
    }
    return 0;
}
static DWORD ImageBitsSize ( HBITMAP hBitmap ) { DIBSECTION ds ; GetObject ( hBitmap , sizeof ( DIBSECTION ) , & ds ) ; switch ( ds . dsBmih . biCompression ) { case BI_RLE8 : case BI_RLE4 : return ds . dsBmih . biSizeImage ; break ; default : case BI_RGB : case BI_BITFIELDS : return BYTESPERLINE ( ds . dsBmih . biWidth , ds . dsBmih . biBitCount * ds . dsBmih . biPlanes ) * ds . dsBmih . biHeight ; break ; } return 0 ; }
DWORD ImageBitsSize(HBITMAP hbitmap)
PARAMETERS:
HBITMAP - hbitmap
DWORD ImageBitsSize ( HBITMAP hbitmap ) PARAMETERS : HBITMAP - hbitmap
/* wrong if haven't called DSCreateDIBSection or
                    * CreateDIBSection with this pbmi */ /* should not have to use "default" */