Click or drag to resize

ImageCreateAsync Method (SDFDoc, String, Obj)

Create and embed an Image from an external file taking into account specified compression hints.

Namespace:  pdftron.PDF
Assembly:  pdftron (in pdftron.dll) Version:
public static IAsyncOperation<Image> CreateAsync(
	SDFDoc doc,
	string filename,
	Obj encoder_hints


Type: pdftron.SDFSDFDoc
A document to which the image should be added. To obtain SDFDoc from PDFDoc use PDFDoc.GetSDFDoc().
Type: SystemString
The name of the image file.
Type: pdftron.SDFObj
The encoder hints

Return Value

Type: IAsyncOperationImage
When this operation completes, it returns an Image object representing the created image.

Currently supported formats are JPEG, PNG, GIF, TIFF, BMP, EMF, and WMF. Other raster formats can be embedded by decompressing image data and using other versions of Image.Create method.

By default the function will either pass-through data preserving the original compression or will compress data using Flate compression. It is possible to fine tune compression or to select a different compression algorithm using 'encoder_hints' object.

See Also