SimpleOCR:SDK Functions – ResizeImg

You are here:
< All Topics

IMG * ResizeImg(IMG * img, int nw, int nh)

Resizes an 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.

nw

Width of the new image.

nh

Height of the new image.

Comments

The original image is left unchanged. If you don’t need it anymore, you have to free it by calling the FreeImg function.

Example

IMG *img,img2; 

// Create an IMG 
... 
img2=ResizeImg(img,640,480); 

if (img2==NULL) 
{
// Error processing 
...
} 

// Use the resized Image 
... 

// Free it 
FreeImg(img2);
Previous SimpleOCR:SDK Functions – ReplaceImage
Next SimpleOCR:SDK Functions – RotateImg
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