---
title: "Graphics.DrawImage Method (Pipeline, RectangleF, Single)"
canonical: https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Drawing_Graphics_DrawImage_3_0d77a5b9.htm
product: "Graphics Mill"
---

# Graphics.DrawImage Method (Pipeline, RectangleF, Single)
 
Draws an image produced by a pipeline on the [Graphics](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Drawing_Graphics.htm.md).
 
**Namespace:** [Aurigma.GraphicsMill.Drawing](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Drawing.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public void DrawImage(Pipeline pipeline,RectangleF dstRect,float opacity
)
```
 
### Parameters
 
 - pipeline
     - Type: [Aurigma.GraphicsMill.Pipeline](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Pipeline.htm.md)
A [Pipeline](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Pipeline.htm.md) producing image to draw.

 - dstRect
     - Type: System.Drawing.RectangleF
A RectangleF structure that specifies the location and size of the drawn image. The image is scaled to fit the rectangle.

 - opacity
     - Type: System.Single
The opacity of the image in range `[0, 1]`. If `0`, image is completely transparent, if `1`, image is completely opaque.
 
## Remarks
  
The image is drawn to destination rectangle on this [Graphics](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Drawing_Graphics.htm.md). If the current image dimensions differ from dimensions of the destination rectangle, the image will be resized to have the same size as the destination rectangle.
 
If you want this method to calculate width and/or height automatically, you can pass `0`s as the **dstRect** rectangle dimensions. The image dimensions will be calculated with the following way:
 
1. If both width and heigth are `0`, the source image dimensions will be taken. This way the image will not be resized during drawing.
2. If only one of arguments is `0`, this argument will be calculated as to save image proportion. For example, the source image is `800x600`, and you pass `400` as width and `0` as height. Height will be calculated to preserve aspect ratio of the image, i.e. it will be `300`.
   
## See Also

### Reference

- [Graphics Class](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Drawing_Graphics.htm.md)
- [DrawImage Overload](https://www.graphicsmill.com/docs/gm/O_T_Aurigma_GraphicsMill_Drawing_Graphics_DrawImage.htm.md)
- [Aurigma.GraphicsMill.Drawing Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Drawing.htm.md)

### Manual

- [Overlaying Images](https://www.graphicsmill.com/docs/gm/overlaying-images-advanced-drawing.htm.md)
