SimpleOCR:SDK Functions

You are here:
< All Topics

IMG

All the images manipulated by SimpleOCR have the IMG type. SimpleOCR provides functions that allows you to handle an IMG object as a Device Independent Bitmap (DIB). See your Windows SDK documentation in order to become familiar with DIB concepts.

The IMG objects are always manipulated through SimpleOCR functions. So even if IMG objects are implemented as structures, you don’t have to bother with its definition. When programming in languages besides C++, substitute IMG * with Long Integer data types.

Please remember, SimpleOCR can only work with bi-level (i.e. black & white) images or grayscale images with 256 shades of grays.

SETOFIMG

Several images that belong to the same document can be grouped in a SETOFIMG object. The SETOFIMG objects are always manipulated through SimpleOCR functions. So even if IMG objects are implemented as structures, you don’t have to bother with its definition.

When programming in languages besides C++, substitute SETOFIMG * with Long Integer data types.

int (SETOFIMG * set, HGLOBAL hDib)

This function is similar to , except that, instead of an IMG object, this function expects an image in the DIB format.

Return Value

If the function fails, a nonzero value is returned.

Parameters

set

A pointer to a set of images of type SETOFIMG.

hDib

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

Example

SETOFIMG *doc; 
HGLOBAL hDib; 
int nb; 

// Creates a set 
doc=CreateMultipleImg(); 

if (doc==NULL) 
{
// error processing 
...
} 

// Retrieve a DIB from the clipboard 
if (IsClipboardFormatAvailable(CF_DIB) && OpenClipboard(hWnd)) 
{
hDib=GetClipboardData(CF_DIB); 
CloseClipboard(); 

// Add DIB to the set 
if( AddDIB(set,hDib) ) 
{
// error processing 
...
}
}
Previous SimpleOCR SDK Disclaimer
Next SimpleOCR:SDK Functions – CreateMultipleImg
Table of Contents
Contact Us for FREE Consultation on Your OCR Project

Share This Story, Choose Your Platform!

OCR Guide
Brands
Compare most popular choices in one cozy and extensive table
Languages
Applications
Go to Top