TwainDrawDIB

Draws a Device Independent Bitmap (DIB) in a GUI window.

Synopsis

error = TwainDrawDIB(Dib, Hdc)

Args

Dib is the DIB returned by TwainCreateDIB.

Hdc is a "device context" for the GUI window.

Returns

An empty string if successfully drawn, or an error code.

Notes

When you no longer need to display a DIB, you should free it by passing it to TwainFreeDIB.

Unlike with TwainDrawStretchDIB, the bitmap is not resized to fit the window. Therefore, if the bitmap is larger than the window's visible area, part of the image may be cutoff. If the bitmap is smaller than the window's visible area, then the image will not fill the window. Regardless of how the image is drawn, TwainSaveDIB always saves the full, original image without any resizing.