ReleaseImage

Image handling

Description

Releases the temporary memory used by an image that was added to the PDF after the document was opened (using functions such as AddImageFromFile) or an image that was found using the FindImages function.

Releasing the image does not affect the PDF itself, images that have already been drawn onto the page will not be removed.

After the image has been released the ImageID is no longer valid and cannot be used with functions such as SelectImage.

Syntax

Delphi

function TPDFlib.ReleaseImage(ImageID: Integer): Integer;

ActiveX

Function PDFlib::ReleaseImage(ImageID As Long) As Long

DLL

int DLReleaseImage(int InstanceID, int ImageID);

Parameters

ImageIDThe ID of the image to release

Return values

0The image could not be released. The ImageID parameter could be invalid or the ImageID doesn't reference an image contained in the selected document.
1The image was released successfully.