src/leptwin.c
static HBITMAP
DSCreateDIBSection(l_int32  width,
                   l_int32  height,
                   l_int32  depth,
                   PIXCMAP  *cmap)
{
HBITMAP       hBitmap;
l_int32       nInfoSize;
LPBITMAPINFO  pbmi;
HDC           hRefDC;
LPBYTE        pBits;

    pbmi = DSCreateBitmapInfo (width, height, depth, cmap);
    if (!pbmi)
        return NULL;

    hRefDC = GetDC(NULL);
    hBitmap = CreateDIBSection(hRefDC, pbmi, DIB_RGB_COLORS,
                               (void **) &pBits, NULL, 0);
    nInfoSize = GetLastError();
    ReleaseDC(NULL, hRefDC);
    free(pbmi);

    return hBitmap;
}
/* **********************************************************************
  HBITMAP DSCreateDIBSection(l_int32 width, l_int32 height, l_int32 depth, 
                             PIXCMAP *cmap)

  PARAMETERS:
    l_int32 width - Desired width of the DIBSection
    l_int32 height - Desired height of the DIBSection
    l_int32 depth - Desired bit-depth of the DIBSection
    PIXCMAP cmap - leptonica colormap for depths < 16

  RETURNS:
    HBITMAP      - a DIBSection HBITMAP of the desired size and bit-depth
                   NULL on failure
    
  REMARKS:
    Creates a DIBSection based on the criteria passed in as parameters.

********************************************************************** */




HBITMAP      - a DIBSection HBITMAP of the desired size and bit-depth
NULL on failure

Creates a DIBSection based on the criteria passed in as parameters.
HBITMAP - a DIBSection HBITMAP of the desired size and bit - depth NULL on failure Creates a DIBSection based on the criteria passed in as parameters .
static HBITMAP
DSCreateDIBSection(l_int32  width,
                   l_int32  height,
                   l_int32  depth,
                   PIXCMAP  *cmap)
{
HBITMAP       hBitmap;
l_int32       nInfoSize;
LPBITMAPINFO  pbmi;
HDC           hRefDC;
LPBYTE        pBits;
    pbmi = DSCreateBitmapInfo (width, height, depth, cmap);
    if (!pbmi)
        return NULL;
    hRefDC = GetDC(NULL);
    hBitmap = CreateDIBSection(hRefDC, pbmi, DIB_RGB_COLORS,
                               (void **) &pBits, NULL, 0);
    nInfoSize = GetLastError();
    ReleaseDC(NULL, hRefDC);
    free(pbmi);
    return hBitmap;
}
static HBITMAP DSCreateDIBSection ( l_int32 width , l_int32 height , l_int32 depth , PIXCMAP * cmap ) { HBITMAP hBitmap ; l_int32 nInfoSize ; LPBITMAPINFO pbmi ; HDC hRefDC ; LPBYTE pBits ; pbmi = DSCreateBitmapInfo ( width , height , depth , cmap ) ; if ( ! pbmi ) return NULL ; hRefDC = GetDC ( NULL ) ; hBitmap = CreateDIBSection ( hRefDC , pbmi , DIB_RGB_COLORS , ( void * * ) & pBits , NULL , 0 ) ; nInfoSize = GetLastError ( ) ; ReleaseDC ( NULL , hRefDC ) ; free ( pbmi ) ; return hBitmap ; }
HBITMAP DSCreateDIBSection(l_int32 width, l_int32 height, l_int32 depth,
PIXCMAP *cmap)
HBITMAP DSCreateDIBSection ( l_int32 width l_int32 height l_int32 depth PIXCMAP * cmap )