How Can We Help?

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);
Contact Us for FREE Consultation on Your OCR Project
=
Table of Contents

Title

Go to Top