ImageCreateAsync 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: 255.255.255.255
Syntax public static IAsyncOperation<Image> CreateAsync(
SDFDoc doc,
string filename
)
Public Shared Function CreateAsync (
doc As SDFDoc,
filename As String
) As IAsyncOperation(Of Image)
public:
static IAsyncOperation<Image^>^ CreateAsync(
[InAttribute] SDFDoc^ doc,
[InAttribute] String^ filename
)
pdftron.PDF.Image.CreateAsync = function(doc, filename);
Parameters
- doc
- Type: pdftron.SDFSDFDoc
A document to which the image should be added. To obtain SDFDoc from PDFDoc use PDFDoc.GetSDFDoc(). - filename
- Type: SystemString
The name of the image file.
Return Value
Type:
IAsyncOperationImageWhen this operation completes, it returns an
Image object representing the created image.
Remarks
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