GDI+ question

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
 
M

Mark Keogh

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top