XImage.Raster
Features
Tech Specs
How-to C#
Pricing

C# Imaging Library
How to draw, print image on another in C#?


Explain How to Draw image on the image in C#.NET





RasteEdge XImage.Raster is a C# image reading, writing, converting, and processing library. You can easily print one image on another in the C# ASP.NET Core, Framework, MVC, WinForms, and WPF applications.


How to draw, paint image on another raster image using C#?

  1. Download XImage.Raster C# imaging library
  2. Install C# library to draw, paint image on another raster image in .NET applications
  3. Step by Step Tutorial










Draw an image on another image in C#



Here we will explain how to draw and print one image on another using C# image library. In the following example, we have one QR Code image, which is 50 pixels wide and 50 pixels high. We will create an empty image which is 200 pixels wide and 200 pixels high, and we will paint the QR Code image on the center of the empty image.

  1. Create a new empty image from scratch in the RasterImage object
  2. Create another RasterImage object with the QR Code image loaded.
  3. Call method DrawMethod.DrawImage() to print the QR Code image on the empty image on the specified position.
  4. Print and save the final image to the file path

RasterImage image = new RasterImage(200, 200, Color.White);
RasterImage annotation = new RasterImage("C://input//qrcode-with-logo.png"); 
DrawMethod.DrawImage(image, annotation, 75, 75);
image.Save("C://output//raster-image-drawing-image-sample.png");






Draw an image on a multi-page TIFF file in C#



If you want to paint an image on a multiple pages tiff image file, you can use the following API to do it. Here the pageIndedx value is starting from 0.

public static void DrawImage(RasterImage image, RasterImage childImage, int xOffset, int yOffset, int pageIndedx)