how add some infprmation to jpeg

Alireza
01-29-2005, 05:35 AM
Hi
Is there any solution for adding some numbers to a certain X,Y of an jpeg picture?

the problem
In every project they have 500-600 jpeg pictures that I savedtheir name and 5 serial numbers related to them in a table.
jpeg pictures created by another application like photoshop.
I want to automaticaly add other 5 numbers to the pictures using aloop in a vb project.

any idea or starting points?

thank you

Gruff
01-29-2005, 05:59 AM
My best guess is that you will need to read your jpegs into a picturebox, Add your numbers by using the picturebox.currentX, .currentY and Print methods then
save the picturebox.image to disk again. By default the picturebox image saves as a .bmp. If you need to save it back as a jpg then you will need to look at using some GDI.API functions.

~T

eXeption
01-29-2005, 06:39 AM
But you cannot save as a jpeg file using GDI. If you want to save it back as jpeg files you have to use either GDI+ (recommended) or any other 3d party libs.

GregDuncan
01-29-2005, 08:52 AM
Why do you want to write numbers on JPG files and then save them again? What if the number changes - you have scared your image perminantly. If you need the image for display then why dont you just add it at the point of rendering or if you need it stored with the file then add it as an XP property or perhaps store the information in an EXIF field?
If you do really want to write directly onto the image then GDI+ is a good option.
The GdipDrawString function is used to write text onto an image.
I am sure OnErr0r has some example in the tutors corner.

Gruff
01-29-2005, 02:51 PM
Thank you for the correction eXception I meant GDI+ (Hardly ever use it myself. :) )
GregDuncan asks a good question though. Displaying numbers on it when you load it would be a snap. If you are running an older operating system and do not have file properties you could always store the numbers as part of the filename.

Cheers,

~T

Alireza
01-29-2005, 04:58 PM
these pictures are plans that must have some codes and serial numbers on them.
now they add this numbers after creating those pictures manualy by opening them adding a frame and numbers and save it again.
it takes a lot of time for them .I'm trying to find a solution to do this automaticaly.

any way thank you all my friends.

eXeption
01-29-2005, 08:46 PM
So a batch processing program would be better...
Hope your (above) problem is solved! :)
A nice idea to use this is that, user specifies only a folder, and your program searches all image files (jpeg), loads them and number them. Or the user specifies start and end files in a directory and you can process all in-betweens.

Regards,
'
HK

Alireza
01-30-2005, 03:58 PM
So a batch processing program would be better...
Hope your (above) problem is solved! :)
A nice idea to use this is that, user specifies only a folder, and your program searches all image files (jpeg), loads them and number them. Or the user specifies start and end files in a directory and you can process all in-betweens.

Regards,
'
HK

thanks
I dont know any thing about GDI+ and need a start point.can you tell me anything about begining.

OnErr0r
01-30-2005, 05:49 PM
..

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum