DTWAIN_ConvertDIBToBitmap
The DTWAIN_ConvertDIBToBitmap converts a Device Independent Bitmap (DIB) into a device dependent bitmap (HBITMAP).
HANDLE DTWAIN_ConvertDIBToBitmap (
Parameters hDib Handle to a device independent bitmap.
hPalette Palette to use, or NULL if no palette is used.
Return Values If the function succeeds, a HANDLE that represents an HBITMAP. If the function fails, NULL is returned.
Comments The DTWAIN_ConvertDIBToBitmap functions takes the device independent bitmap, hDib, and returns an HBITMAP representing the DIB. This function could be used in cases where the application requires an HBITMAP instead of the DIB to further process the image. The HANDLE that is returned is actually an HBITMAP. All images created by TWAIN devices when performing a native acquisition, or buffered acquisition that is not compressed are in DIB form. For example, the DTWAIN_AcquireNative and DTWAIN_AcquireNativeEx functions store DIB's and not HBITMAPs. If the application needs to work with HBITMAP, the DTWAIN_ConvertDIBToBitmap function can be called to "convert" one of the DIBs stored to an HBITMAP (actually, DTWAIN creates the HBITMAP, but the original hDib is not altered). One usage of DTWAIN_ConvertDIBToBitmap would be to call DTWAIN_GetCurrentAcquiredImage or DTWAIN_GetAcquiredImage, and convert the return value into an HBITMAP by calling DTWAIN_ConvertDIBToBitmap. TWAIN State Transitions None
Prerequisite Function Call(s) DTWAIN Source Selection Function DTWAIN Acquisition Function (DTWAIN_AcquireNative or DTWAIN_AcquireBuffered)
See Also DTWAIN_GetCurrentAcquiredImage |