ImageGear for C and C++ on Windows v19.10 - Updated
IG_REC_image_area_clear
API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Recognition Image Preprocessing Functions > IG_REC_image_area_clear

Clears a rectangular area of the hImage image in the recognition engine's memory space.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_image_area_clear(
   HIG_REC_IMAGE hImage,
   LPCRECT pRect
);

Arguments:

Name Type Description
hImage HIG_REC_IMAGE Handle of the image to be modified.
pRect LPCRECT Coordinates of the rectangular area to be cleared by setting all of its bits to zero (0). A NULL value means the entire image.

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

This function does not process image pixels.

Example:

 
Copy Code
AT_ERRCOUNT ErrCount = 0;
HIGEAR higImage = 0;
HIG_REC_IMAGE higRecImage = 0;
AT_RECT Rect;

Rect.left = 1;
Rect.right = 101;
Rect.top = 1;
Rect.bottom = 101;
ErrCount += IG_load_file("Image.tif", &higImage); 
ErrCount += IG_REC_image_import(higImage, &higRecImage);
ErrCount += IG_REC_image_area_clear(higRecImage, &Rect); 

//...

ErrCount += IG_REC_image_delete(higRecImage);
ErrCount += IG_image_delete(higImage);

Remarks:

With a bi-tonal image, setting all its bits to zero (0) results in an entirely white image. In other cases (but not for palette-color images), the resulting image is entirely black.

See Also

HIG_REC_IMAGE