Guide for C#
Core Document Formats
Additional Features
Draw Text

C# Imaging - Draw Text on Image in C#.NET

How to Use C# Codes to Draw Text on Image in .NET Imaging SDK

Visual C#
Home > .NET Imaging SDK > C# > Draw Text on Image
If this is your first time to use our DocImageSDK, we strongly suggest you reading How to Start first!

Overview on Drawing Text on Image in C#
.NET imaging SDK provides standard based and robust technique for Visual C# developers to draw text on images in your applications. And this page is prepared to show users how to dynamically write text on a pre-existing image with C#.
Related .net document control helps: pdf document viewer: ASP.NET PDF Document Viewer in C#: open, display, view, annotate, redact Adobe PDF files online in ASP.NET MVC & WebForm... ppt viewer: ASP.NET PowerPoint Document Viewer Control (MVC & WebForms): view ppt, pptx files online in C# using ASP.NET pdf page: ASP.NET PDF Pages Edit Control: add, remove, sort, replace PDF pages online using C# excel web viewer: ASP.NET Excel Viewer in C# Control (MVC & WebForms): view Office Excel document in web browser.
sharepoint document viewer: ASP.NET SharePoint Document Viewer: view, annotate, redact documents in SharePoint multipage tiff viewer: ASP.NET Tiff Viewer: view, annotate multipage Tiff images in ASP.NET MVC, WebForms using C# Control word document viewer: ASP.NET Office Word Document Viewer: view Word doc files online using C# in ASP.NET MVC web applications
In this image text drawing example, users can learn that:
  • General image text writing benefit and technique list in C# program
  • Three main procedures on how to use provided C# demo code to draw text on image
  • Other important image processing functions within .NET Imaging SDK libraries
C# Image - General Image Text Writing Benefits and Technique
  • Develop image text drawing function completely in Visual C# class
  • Compatible with Visual Studio 2005, .NET 2.0 Framework (later versions are also supported)
  • .NET Imaging Processing DLL and Image Drawing DLL are necessary for image text drawing
  • Support adding text on bitonal, color and grayscale images in C#.NET program
  • Enable users to write an arbitrary text at any named area of the image page in C#
  • Mature image drawing methods in C# to specify text font size, color, style and effects
  • Support unlimited undo and redo levels within our powerful image core technique
C# Image - Windows Program to Draw Text to Image
Generally speaking, this part is mainly consisted of three modules like below:
  • How to start a Windows forms project in Visual C# language
  • Full developed methods in C# to add and write text on image and document page
  • Snippet of C# sample code to help users with an easier image text drawing work
Apart from text drawing on image in C# application, we still provide following image drawing tutorials for other .NET platforms programmers: how to add draw text in designed shape on image in VB.NET class, create and view text on image page in ASP.NET web and methods on adding text on image in .NET Windows Forms project.

C# Image - Start and Run a C# Windows Application

This guide tells users how to create an appropriate application to run image text drawing function in C# programming language. After this, users can easily combine graphic and text drawing together in the C# project. Please follow detailed procedure tips as below.
  1. First, please open and run Microsoft Visual Studio (2005 or later versions);
  2. Then, you are supposed to create a project with programming language - Visual C#;
  3. And do copy created "RasterEdgeLicense.txt" to the new project folder, together with .NET Imaging SDK DLL(s);
  4. Add RasterEdge .NET imaging basic and drawing dlls to your C# project reference;
    • RasterEdge.Imaging.Drawing.dll
    • RasterEdge.Imaging.Basic.dll
  5. Last, in order to make this image text adding application work, you need the following references:
using System.IO;
using System.Drawing.Printing;
using RasterEdge.Imaging;
using RasterEdge.Imaging.Processing;
using RasterEdge.Imaging.Drawing.Image.Text;

C# Image - Method on How to Add Text on Image

Although following C# method for image text drawing looks very simple, it can empower users with great capabilities to customize image text, such as adjusting text font size, color, style and effects. What's more, using following API, users can work out your own image drawing features in C# project.
public void TextDrawing(string s, Font font, Brush brush, PointF point);

C# Image - Demo Code to Draw Text to Image

Use following short but useful C# code example to add text and text graphics on image page. All the C# demo code is adjustable to fulfill different users' needs.
using System.IO;
using System.Drawing.Printing;
using RasterEdge.Imaging;
using RasterEdge.Imaging.Processing;
using RasterEdge.Imaging.Drawing.Image.Text;

RasterEdgeImaging Text = new RasterEdgeImaging();

Bitmap LoadImage = new Bitmap("C:\\1.jpg");
Graphic Text = Graphics.FromImage(LoadImage);
Font DrawFont = new Font("Arial", 16, FontStyle.Regular);
SolidBrush DrawBrush = new SolidBrush(Color.Red);
PointF DrawPoint = new PointF(10.0F, 30.0F);
Text.TextDrawing = ("", DrawFont, DrawBrush, DrawPoint);

Recommended Vital Image Editing Functions in C#
Here you come to the random recommendation part on image processing in C# by using .NET Imaging Processing SDK controls. If you want more image applications, please go to image processing overview in C#.

Recommend this to Google+ is professional provider of ASP.NET MVC Document Viewer, ASP.NET PDF Viewer, MVC PDF Viewer document, content and imaging solutions, available for ASP.NET AJAX, Silverlight, Windows Forms as well as WPF. We are dedicated to provide powerful & profession imaging controls, PDF document, image to pdf files and components for capturing, viewing, processing, converting, compressing and stroing images, documents and more.

©2000-2017 Raster