Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 484

Previous Page 483   Index   Next Page 485

Function Reference
Page 484 of 750
Images with an alpha channel
Images which contain an alpha channel are always inserted transparent, independent of the current
value of SetUseTransparency(). If an image with an alpha channel should appear opaque then draw
a rectangle in the wished background color in background of it (just before inserting the image).
To insert an image from a file buffer use the function InsertImageFromBuffer(). It is possible to use
one image on several pages or positions. To insert an image multiple times use the function
PlaceImage(). However, once an image was inserted, the physical dimension cannot be changed
anymore; it can only be scaled to different sizes. If an image should be used with different
dimensions, insert the largest version first or insert it again with this function.
DynaPDF checks whether an image was already inserted before inserting an image again. The
duplicate check is done by using a MD5 hash of the file name and the used parameters to insert the
image. If all parameters are the same, the already available image is used instead.
Return values:
If the function succeeds the return value is the image handle, a value greater or equal zero. If the
function fails the return value is a negative error code.

Previous topic: Transparent images (Color Key Masking)

Next topic: InsertImageFromBuffer