Home All Groups Group Topic Archive Search About
Author
21 Jun 2006 11:45 AM
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

Author
22 Jun 2006 5:05 AM
Mark Keogh
Adriano wrote:
Show quoteHide quote
> 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
Author
23 Jun 2006 1:56 AM
Adriano
Hello Mark!
I really appreciate your help!!!

Regards,
Adriano


Show quoteHide quote
"Mark Keogh" <m@ark.com> wrote in message
news:eHfs%23lblGHA.5044@TK2MSFTNGP02.phx.gbl...
> Adriano wrote:
>> 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