How Can We Help?

SimpleOCR:SDK Functions – DIBToIMG

You are here:
< All Topics

IMG * DIBToIMG(HGLOBAL hDib)

Converts a memory block containing a Device Independent Bitmap (DIB) to an IMG object.

Return Value

A pointer to an IMG object. If the function fails, the return value is NULL.

Parameters

hDib

A HGLOBAL handler referencing a Global Memory object containing a BITMAPINFO structure followed by the bitmap bits.

Comments

See your Windows SDK documentation for obtaining information about Device Independent Bitmaps and how to use it.

Example

Retrieve a DIB from the clipboard and convert it to an IMG object

HGLOBAL hDib; 
IMG *img; 

// Retrieve an IMG from the clipboard 
if (IsClipboardFormatAvailable(CF_DIB) &&
OpenClipboard(hWnd)) { 
hDib=GetClipboardData(CF_DIB); 
img=DIBToIMG(hDib); 
CloseClipboard();
}
Contact Us for FREE Consultation on Your OCR Project
=
Table of Contents

Title

Go to Top