SimpleOCR:SDK Functions – HalfSizeImg

You are here:
< All Topics

IMG * HalfSizeImg(IMG * img)

Shrinks a bi-level image at 50% of the original size and returns the result in a grayscale image.

Return Value

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

Parameters

img

Pointer to an image of type IMG.

Comments

The original image is left unchanged. If you don’t need it anymore, you have to free it by calling the FREEIMG function. This function is mainly useful when you want to display a reduced bi-level image with a good display quality.

Example

IMG *img,img2; 

// Create an IMG 
... 
img2=HalfSizeImg(img); 

if (img2==NULL) 
{
// Error processing 
...
}
Previous SimpleOCR:SDK Functions – GetNbImages
Next SimpleOCR:SDK Functions – InsertImage
Table of Contents
Contact Us for FREE Consultation on Your OCR Project
Go to Top