borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (play stops when selecting another song)Next Topic (Scan Image) New Topic New Poll Post Reply
AndreaVB Forum : Multimedia : Add text to image
Poster Message
ShooterNL
Level: Guest


icon Add text to image

Hello,

I looking days now for the code to add text to a .jpg file.
The idea is to put the filename of the image inside the image in the lower right corner. ( font Arial, colour=White, background colour=black)

I know programs like IrFanView can do this in batch, but i need the function in my own program.

I'm working in VB6.

Any help would be great, i really don't know where to look anymore.

Thx in advance.

ShooterNL

24-08-2004 at 07:55 AM
| Quote Reply
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1156
icon Re: Add text to image

Bit of a cop out, but would a simple label with the background set to transparent do? I know its not in the image but if its only for displaying it might be what you want.

Steve

24-08-2004 at 08:16 AM
View Profile Send Email to User Show All Posts | Quote Reply
ShooterNL
Level: Guest

icon Re: Add text to image

Thx for helping, but unfortunately that's not what i need.
I don't only want to display it, but use it to send the picture via e-mail, print in documents etc.
So it's an easy reference when talking about a certain image.

24-08-2004 at 08:23 AM
| Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon Re: Add text to image

Well, I can only give you an idea how to do it, oyu will have to code it by yourself. The standard way would be to do it using some basic API's that work with Bitmaps and device context (DC). The idea would be:

1) Load picture in DC
2) Use API (ex DrawTextEx) to write text on DC
3) Find some dll on the net which will do a conversion from bmp to gif (since picture from DC will be saved in bmp file)

____________________________
If you find the answer helpful, please mark this topic as solved.

24-08-2004 at 06:02 PM
View Profile Send Email to User Show All Posts | Quote Reply
ShooterNL
Level: Guest

icon Re: Add text to image

Thx for the help.
I'm going to try it.

I'll let you know.

24-08-2004 at 07:07 PM
| Quote Reply
AndreaVB Forum : Multimedia : Add text to image
Previous Topic (play stops when selecting another song)Next Topic (Scan Image) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder