Hi,

I have written an application in VB6 that grabs an image from a webcam and writes it out to the hard drive. Before writing it I would like to add a text line listing which camera it is and the date and time. I have no problem sorting out the text I want but just need help to actually write it on the image.

I know I could write the image to a file then use Imagemagik but would prefer to do it within VB6 if possible.

Thanks

George

Is the image temporialy saved to a picture box? If so Picture1.Print "My String". Also, take a look at the currentx/y properties so you can adjust where your text gets printed.

Good Luck

Thought it was probably something like that. I have used picturebox before but never written on the image. will have a look and see how I get on.

Thanks

Just remember, that just because you savepicture picture1, "mypathfilename.jpg" does not mean that you actually save the picture as a jpg. Save picture saves it as a bmp. You will need to search the web for code to save the picture as a jpg. Right off the top of my head I know that there is a dll out there that will do it for you, some sort of commandline exe, and then there is some GDI+ code, and finally, the WIA 2.0 from MS. Now, if on a 2k machine or earlier you could also use the Wang/Kodak image edit control to save it as a tiff with jpg compression and then just name the file as a jpg (control would not allow a jpg extension but would use jpg compression algorithm because at time the jpg was still under copyright (no longer)). Oh yeah! Search PSC for "save bmp as jpg". You should find a bunch of code...

Good Luck

This article has been dead for over six months. Start a new discussion instead.