DynaPDF Manual - Page 252

Previous Page 251   Index   Next Page 253

Function Reference
Page 252 of 787
SI32 CreateICCBasedColorSpaceEx(
const PPDF* IPDF,
const void* Buffer,
UI32 BufSize)
The function creates an ICC-based color space exactly like CreateICCBasedColorSpace() but accepts
a file buffer as input. See CreateICCBasedColorSpace() for further information.
Return values:
If the function succeeds the return value is the color space handle, a value greater or equal zero. If
the function fails the return value is a negative error code.
LBOOL pdfCreateImage(
const PPDF* IPDF,
// Instance pointer
const char* FileName, // Ouput file name or NULL
TImageFormat Format)
// Output image format
typedef enum
// RGB, CMYK, Gray, B&W -> CCITT 3/4, JPEG, Flate, LZW
// RGB, CMYK, Gray -> JPEG compression
// Gray, RGB, B&W
-> Flate compression
ifmReserved, // Reserved for future extensions
// Gray, RGB, B&W
-> Uncompressed
// RGB, CMYK, Gray -> JPEG2000 compression
The function creates an empty image in the specified format. This is a helper function to create
image files from the rasterizer or from raw images returned by the content parser. See
ParseContent() or RenderPage() for further information. After the image was created one or more
images can be added to it with AddImage(). Note that TIFF is the only supported multi-page format.
All other formats support exactly one image.
If the parameter FileName is set to NULL the image is created in memory. In this case the image
buffer is available after CloseImage() was called. To get the file buffer call the function
GetImageBuffer(). Note that the internal resources of memory based images must be manually freed
with FreeImageBuffer() in this case.

Previous topic: CreateHideAction, CreateICCBasedColorSpace

Next topic: CreateImportDataAction

Start Chat