Add tags to jpg files

R

Rotsey

Hi,

Anyone know how to add Tags to JPG files using C# or VB.NET in Vista???

I have a XP dev box so I want to do dev it from there?

Malcolm
 
K

kimiraikkonen

Hi,

Anyone know how to add Tags to JPG files using C# or VB.NET in Vista???

I have a XP dev box so I want to do dev it from there?

Malcolm

Are you meaning adding texts onto image and saving them?
If so, drawstring function does that under GDI+

Sample code i've done:
-Just change <your_text> string:-

Dim mypicture As Bitmap
mypicture = New Bitmap(PictureBox1.Image)

Dim mygraph As Graphics
mygraph = Graphics.FromImage(mypicture)
'create a new brush with a single, solid color
Dim myBrush As New SolidBrush(Color.Red)

'create a new basic font. you can mess around and make it cooler
Dim f As Font = New Font(Font.Bold, 20)

'draw the string onto the form.
' Location is 100(x), 33(y), you may change
mygraph.DrawString("<your_text>", New Font("Arial", 18,
FontStyle.Regular), Brushes.Red, 0, 10)

PictureBox1.Image = mypicture

mygraph.Dispose()


Then save using:
PictureBox1.Image.Save(<path>)

I was searching this code with no help in group, other external sites
provides similar solutions for that purpose.

Hope this helps.
 

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

Similar Threads

Will not auto open .jpg 1
Identify JPG files 6
Import File Information 0
hdparm -Tt ? 13
Cycle ride 13
Howto SET image metadata (Tiff, geotiff, exif tags) 0
Vb.net and ASP. 3
Comment field of jpg image 1

Top