ImgDelete

Top  Previous  Next

Prototype

 

ImgDelete(intImageHandle)

 

Description

 

Deletes an image from memory.

 

Parameters

 

intImageHandle: integer value corresponding to the image handle.

 

Returned value

 

None.

 

Notes

 

Its very important to use this function to remove from memory images allocated using other functions as ImgOpen or ImgCopy. After calling this function the image handle will be invalid and should be not used.

 

 

Example

 

// Find the bits depth of image

nBits:=ImgGetBitsPixel(_CurrentImage);

// If it's not monochrome,

if nBits>1 then

begin

// Copying the whole image

BinaryImage:=ImgCopy(_CurrentImage,0,0,0,0);

// Thresholding

ImgThreshold(BinaryImage,127);

// Saving

NewFileName:=ExtractFilePath(_CurrentOutputFile)+'\Mono'+ExtractFileName(_CurrentOutputFile);

ImgSaveAsTif(BinaryImage,NewFileName,5,0);

// Deleting binarized image from memory

ImgDelete(BinaryImage);

end;