.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

PdfGraphics.DrawImage(Byte[], RectangleF) Method

Draws an image using an array of bytes representing image data and the image bounds.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Pdf.v21.1.Drawing.dll


public void DrawImage(
    byte[] data,
    RectangleF bounds


Name Type Description
data Byte[]

An array of bytes representing an image to draw.

bounds RectangleF

A RectangleF structure that specifies the bounds used to draw an image.


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 are used for coordinate transformation only (world coordinates to page coordinates). See the Coordinate Systems topic to learn more about the coordinate transformations.

If you embed multi-page TIFF images with CCITT T.4 or CCITT T.6 compression to the document, the PdfDocumentProcessor draws the first page only.


The PdfGraphics will produce vector graphics for the EMF+ metafiles only. If a metafile contains more than GDI+ commands, it will be rasterized and rendered as a bitmap.

See Also