Writing Text to image using Vb.Net Or writing text to image .net Or writing to image file .Net
You can write text to image pro grammatically using VB.Net. This is sample code in VB.Net.
Solution:
Namespace required:
Imports System.Drawing
Imports System.Drawing.ImagingSource Code:
Dim objBitmap As New Bitmap(100, 50)
Dim objGraphics As Graphics = Graphics.FromImage(objBitmap)
Dim objPoint As New PointF(5.0F, 5.0F)
objGraphics.FillRectangle(Brushes.White, 0, 0, Width, Height)
objGraphics.DrawString(Me.TextBox1.Text, “selectedfont”, Brushes.Black, objPoint)
objBitmap.Save(“Result.JPG”, ImageFormat.Jpeg)
Explanation:
At place of selected font you have to specify name of font, this is of type drawing font.