PdfGraphics.DrawImage(Image, RectangleF) Method
Draws an image using the specified image bounds.
Namespace: DevExpress.Pdf
Assembly: DevExpress.Pdf.v19.1.Drawing.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
image | Image | An Image object that specifies the image to draw. |
bounds | RectangleF | A RectangleF structure that specifies the image bounds. |
Remarks
This method renders an image with its original resolution (DPI).
To add an image to the page, you need to call one of the PdfGraphics.AddToPageForeground, PdfGraphics.AddToPageBackground, and PdfDocumentProcessor.RenderNewPage overload methods. Note that these methods accept DPI values as arguments. The DPI values do not affect image quality and used for coordinate transformation only (world coordinates to page coordinates).
Important
The PdfGraphics will produce vector graphics for the EMF+ metafiles only. If a metafile contains not only GDI+ commands, it will be rasterized and rendered as a bitmap.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DrawImage(Image, RectangleF) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.