DrawImageAndRelease

Image handling, Page layout, Optimisation

Description

Draws the specified image on the selected page, then releases its image handle from the document image cache after the page resource reference has been registered

Reference page for DrawImageAndRelease. The function belongs to Image handling, Page layout, Optimisation and keeps all identifiers exactly as shown

Syntax

Delphi

Function TPDFlib.DrawImageAndRelease(ImageID: Integer; Left, Top, Width, Height: Double): Integer;

ActiveX

Function PDFlib::DrawImageAndRelease(ImageID As Long, Left As Double, Top As Double, Width As Double, Height As Double) As Long

DLL

int DLDrawImageAndRelease(int InstanceID, int ImageID, double Left, double Top, double Width, double Height);

Return values

ImageIDThe image handle returned by an image creation or import function
LeftThe horizontal co-ordinate of the left edge
TopThe vertical co-ordinate of the top edge
WidthThe drawn width
HeightThe drawn height

Return values

0The image handle was invalid, the image could not be drawn, or the handle could not be released
1The image was drawn and the handle was released

See also

The saved PDF retains the image object because the page resource dictionary already references it before the cache handle is released

After this function succeeds, SelectImage(ImageID) returns 0 for that released handle