---
title: "Overlay an Image onto Another Image"
canonical: https://www.graphicsmill.com/samples/Drawing/DrawingImages/DrawingImage_cs
product: "Graphics Mill"
source: "Drawing/DrawingImages/DrawingImage.cs"
---

# Overlay an Image onto Another Image

Apply a watermark image onto a base image using advanced graphics drawing features.

## Instruction

Overlay a watermark image onto another image using advanced graphics drawing capabilities.

## Code Snippet

```csharp
using (var bitmap = new Bitmap("Venice.jpg"))
using (var watermark = new Bitmap("Stamp.png"))
using (var graphics = bitmap.GetGraphics())
{
    graphics.DrawImage(watermark, 10, bitmap.Height - watermark.Height - 40);

    bitmap.Save("DrawImage.jpg");
}
```

## Explanation

The code:

- Loads a base image and a watermark image.
- Creates a graphics object from the base image for advanced drawing operations.
- Draws the watermark near the bottom-left corner of the base image with a margin.
- Saves the composited image to a new file.

## Tags

- [Bitmap](<https://www.graphicsmill.com/samples/tags/bitmap_md>): Working with images via the Bitmap API
- [Drawing](<https://www.graphicsmill.com/samples/tags/drawing_md>): Drawing vector shapes and text
- [Watermark](<https://www.graphicsmill.com/samples/tags/watermark_md>): Adding text or image watermarks

## Input

- [Venice.jpg](<https://www.graphicsmill.com/samples/Drawing/compiled/Debug/Venice_jpg>) (preview)
- [Stamp.png](<https://www.graphicsmill.com/samples/Drawing/compiled/Debug/Stamp_png>) (preview)

## Output

- [DrawImage.jpg](<https://www.graphicsmill.com/samples/Drawing/compiled/Debug/DrawImage_jpg>) (preview)

## Used APIs

- [Aurigma.GraphicsMill.Bitmap.GetGraphics](<https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Bitmap_GetGraphics.htm.md>)
- [Aurigma.GraphicsMill.Drawing.Graphics.DrawImage(Bitmap,Single,Single)](<https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Drawing_Graphics_DrawImage_3_b9413d4f.htm.md>)
