I have this code;
public static Image AddText(this Image image, ImageText text)
{
Graphics surface = Graphics.FromImage(image);
Font font = new Font("Tahoma", 10);
System.Drawing.SolidBrush brush = new SolidBrush(Color.Red);
surface.DrawString(text.Text, font, brush, new PointF { X = 30, Y = 10 });
surface.Dispose();
return image;
}
However, when the text is drawn onto my image it's red with a black border or shadowing.
How can I write text to an image without any border or shadow?
EDIT
I solved this by adding;
surface.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
If someone can explain why I needed this that would be great.