Imports System.Drawing
Imports System.Drawing.Drawing2D
Dim b As New Bitmap(500, 400)
Dim g As Graphics
Dim gp As New GraphicsPath
gp.AddString("Test String", FontFamily.GenericSerif, 0, 72, New PointF(100, 250), New StringFormat)
g = Graphics.FromImage(b)
g.Clear(Color.White)
g.SmoothingMode = SmoothingMode.HighQuality
g.DrawPath(Pens.Black, gp)
Response.AddHeader("Content-Type", "binary/octet-stream")
Response.AddHeader("Content-Disposition", "filename=img.jpg")
Response.Flush()
b.Save(Response.OutputStream, Imaging.ImageFormat.Jpeg)
the g.SmoothingMode sets the smoothness, obviously, of the GraphicsPath.
the graininess or blurriness usually comes up on these GDI images so dont worry too much about it.