How to C#: Imaging
Using Imaging SDK for C#.NET
Winforms Controls
Image Load
Image Access and Modify
Image Draw
Image Draw
  |  
Home ›› XImage.Raster ›› C# Raster: Image Draw

C# Raster - Image Draw in C#.NET


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




Overview



.NET Imaging SDK provides Visual C#.NET developers and programmers with the most comprehensive and useful image drawing toolkits. These image Annotation SDK components can be seamlessly implemented into C# image projects with the capabilities of drawing text on image.


RasterEdge .NET Imaging SDK is an advanced image solution in the market. It allows .NET developers to draw images in various .NET Framework applications, especially for C#, VB, .NET Windows Forms and ASP.NET web form applications. For beginners, we provide detailed online image drawing tutorial in each programming environment, please link respectively: VB.NET code to draw image, how to draw text and graphics on image within .NET WinForms project and apply image drawing function in ASP.NET platform.




Draw Text On The Image In C#.NET



Image draw annotation in C# mainly contains two vital applications, one is drawing specified text object to present image, and the other is drawing multiple .NET graphics on image page.

Below is entire C# demo code to draw text “Your text” as annotation to image.



Sample code Draw text on the image:




//New Annotation object
TextAnnotation annotation = AnnotationGenerator.CreateTextAnnotation(10F, 100F, 200F, 100F, "Your text!!", new System.Drawing.Font("Arial", 12F));
annotation.FontBrush = new AnnotationBrush();
annotation.FontBrush.Solid_Color = new REColor(Color.Red);
RasterImage img = new RasterImage(@"input.jpeg");
ImageProcess processor = new ImageProcess(img);            processor.DrawAnnotation(handler);