Click or drag to resize

ImageCreate Method (SDFDoc, String)

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 Image Create(
	SDFDoc doc,
	string filename


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.

Return Value

Type: Image
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