GDI+ question

  • Thread starter Thread starter Adriano
  • Start date Start date
A

Adriano

Hello!

help anybody please with this simple task using VB.NET:
I have an image having size 320x240 at "C:\myImage.JPG".
I want to put some text, say "Hello World!" (arial 20, red) somewhere on the
image and
save it as "C:\myImage1.JPG".

any help will be greatly appreciated,

thanks in advance!
Adriano
 
Adriano said:
Hello!

help anybody please with this simple task using VB.NET:
I have an image having size 320x240 at "C:\myImage.JPG".
I want to put some text, say "Hello World!" (arial 20, red) somewhere on the
image and
save it as "C:\myImage1.JPG".

any help will be greatly appreciated,

thanks in advance!
Adriano

Very rough off the top of my head but ...

Using oImage As New (open the bitmap or whatever here)

Dim g As Graphics = Graphics.FromImage(oImage)

g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias
g.SmoothingMode = SmoothingMode.AntiAlias

g.DrawString(<font details and text etc>)
oImage.Save(<filename>, ImageFormat.??????????)

End Using
 
Back
Top