Click or drag to resize

Picture Constructor (DocumentModel, String, Boolean)

Initializes a new instance of the Picture class.

Namespace:  GemBox.Document
Assembly:  GemBox.Document (in GemBox.Document.dll) Version: 29.0.35.1016
Syntax
public Picture(
	DocumentModel document,
	string picturePath,
	bool isLink
)

Parameters

document
Type: GemBox.DocumentDocumentModel
The owner document.
picturePath
Type: SystemString
The file path to the image.
isLink
Type: SystemBoolean
If set to picture won't be embedded in the document, instead picturePath will be a link to the external picture.
Remarks

This constructor instantiates Image object (for getting PictureFormat and calculating width and height in points). This approach slightly impairs performance (instantiating Image object requires around 20-50ms for larger images) so, if performance is crucial or you need to insert a lot of images, use constructors that accept PictureFormat argument.

Image formats Bmp, Exif, Icon and MemoryBmp are converted to Png since they are not supported in GemBox.Document component.

HorizontalResolution and VerticalResolution are used when calculating width and height in points.

See Also