ImageGear for C and C++ on Windows v20.3 - Updated
IG_PDE_image_create
API Reference Guide > PDF Component API Reference > PDF Component Objects Reference > Page Editing Objects and Elements > HIG_PDE_IMAGE > IG_PDE_image_create

Creates an image object.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_PDE_image_create(
        LPAT_PDE_IMAGEATTRS lpAttrs,
        LPAT_PDF_FIXEDMATRIX lpMatrix,
        LONG nFlag,
        HIG_PDE_COLORSPACE hColorSpace,
        LPAT_PDE_COLORVALUE lpColorValue,
        LPAT_PDE_FILTERARRAY lpFilters,
        HIG_PDF_STREAM hDataStream,
        LPBYTE lpData,
        LONG nDataLen,
        LPHIG_PDE_IMAGE lphImage 
);

Arguments:

Name Type Description
lpAttrs LPAT_PDE_IMAGEATTRS Pointer to AT_PDE_IMAGEATTRS with attributes of the image.
lpMatrix LPAT_PDF_FIXEDMATRIX Pointer to AT_PDF_FIXEDMATRIX that holds the transformation matrix to use for the image.
nFlag LONG enumIGPDEImageDataFlags flags. If the AT_PDE_IMAGE_ENCODED_DATA flag is set, and the data is provided directly (not as a stream), then nDataLen must specify the length of data.
hColorSpace HIG_PDE_COLORSPACE Color space of the image. When the image is an imagemask, hColorSpace is the color space of the lpColorValue argument.
lpColorValue LPAT_PDE_COLORVALUE Pointer to AT_PDE_COLORVALUE structure. If the image is an image mask, lpColorValue must be provided.
lpFilters LPAT_PDE_FILTERARRAY Pointer to AT_PDE_FILTERARRAY structure that specifies which filters to use in encoding the contents; may be NULL. Filters will be used to encode the data in the order in which they are specified in the array.
hDataStream HIG_PDF_STREAM Stream holding the image data.
lpData LPBYTE Image data. If hDataStream is non-NULL, data is ignored. If there is a great deal of data, as for a large image, it is recommended you use the hDataStream parameter for the image data.
nDataLen LONG Encoded length of lpData, in bytes.
lphImage LPHIG_PDE_IMAGE The image object.

Return Value:

Error count.

Supported Raster Image Formats:

See Section 4.8 of the PDF Reference for information on image types supported by the PDF format.

Remarks:

The image data may be specified as a stream or as a buffer. If hDataStream is non-NULL, lpData is ignored.

See IG_PDE_image_set_data_stream for information on handling the stream.

The caller must dispose of hDataStream after calling this function.

Call IG_PDE_element_release to dispose the created image object when finished with it.

Is this page helpful?
Yes No
Thanks for your feedback.