In this snippet tutorial we're going to be adding on to our series of C# image editing tutorials. This tutorial is going to provide the code required to do basic text drawing including anti-aliasing and text alignment.
For more information on C# image editing, check out our previous two tutorials: C# Tutorial - Image Editing: Saving, Cropping, and Resizing and C# Tutorial - Image Editing: Rotate.
Ok, let's get started. The first thing we need to do is get a
Bitmapobject from an image file.
Bitmap myBitmap = new Bitmap("C:\\myImage.jpg");
Now that we have a
Bitmapobject we can get a
Graphicsobject from it. The
Graphicsobject will be doing all of our text drawing.