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

DynaPDF Manual - Page 385

Previous Page 384   Index   Next Page 386

Function Reference
Page 385 of 750
typedef UI32 TParseFlags;
#define pfNone
0x00000000 // Default
#define pfDecomprAllImages 0x00000002 // Decompress all image types
#define pfNoJPXDecode
0x00000004 // Do not decompress JPEG2000 images
#define pfDitherImagesToBW 0x00000008 // Floyd-Steinberg dithering.
#define pfConvImagesToGray 0x00000010 // Convert the image to DeviceGray
#define pfConvImagesToRGB
0x00000020 // Convert the image to DeviceRGB
#define pfConvImagesToCMYK 0x00000040 // Convert the image to DeviceCMYK
#define pfImageInfoOnly
0x00000080 // Return only the image properties
The function retrieves the properties of an image as well as the decompressed image buffer if
needed. By default all images are returned decompressed, with exception of image types which are
already stored in a valid file format like JPEG and JPEG 2000 images.
If all image types should be decompressed set the flag pfDecompressAllImages.
This function allocates memory that should be released with FreeImageObj() when finish.
Image handles are simple array indexes. The number of image objects can be determined with
GetImageObjCount(). Note that this array does not include inline images which are stored in content
streams. Such images can only be accessed with ParseContent().
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SI32 pdfGetImageObjCount(
const PPDF* IPDF) // PDF Instance
The function returns the number of image objects which were loaded with DynaPDF functions or
imported from external PDF files. The images can be accessed with GetImageObj().
Return values:
The return value is the number of image objects. This function cannot fail.
LBOOL pdfGetImageObjEx(
const PPDF* IPDF,
// Instance pointer
const void* ImagePtr,
// Image pointer
TParseFlags Flags,
// See description at GetImageObj()
struct TPDFImage* Image) // Structure to be filled with data
The function can be used to decompress an image mask or soft mask that is associated with a base
image that was returned by ParseContent() or GetImageObj().
The function allocates memory that should be released with FreeImageObjEx() when finish.

Previous topic: GetImageObj

Next topic: GetImportFlags