Changing a text value within a Image

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
leofelix
Forum Newbie
Posts: 3
Joined: Mon Aug 16, 2010 2:10 am

Changing a text value within a Image

Post by leofelix »

Hello Everyone,

Have a corel draw image. I need to position some text placeholders in the image and save the image in a folder. During runtime I want to replace the text placeholders with database values and print the image using PHP. Can this be done. Please give your suggestions.
Gargoyle
Forum Contributor
Posts: 130
Joined: Wed Jul 14, 2010 12:25 am

Re: Changing a text value within a Image

Post by Gargoyle »

if you're talking about proprietary file formats, no, not out of the box. unless there are libraries for this somewhere, it will require massive effort to get this working.

if you're talking about jpeg/gif/png images, you can specify x/y coordinates and then write text onto this image by using the gd library or imagemagick.
leofelix
Forum Newbie
Posts: 3
Joined: Mon Aug 16, 2010 2:10 am

Re: Changing a text value within a Image

Post by leofelix »

Thanks for your comments. I problem is how to know the xy properties from an image (say jpg). and I also have around 10 text placeholders. I need to identify the placeholders xy at runtime
leofelix
Forum Newbie
Posts: 3
Joined: Mon Aug 16, 2010 2:10 am

Re: Changing a text value within a Image

Post by leofelix »

Thanks for your comments. My problem is, how to know the xy properties from an image (say jpg). and I also have around 10 text placeholders. I need to identify the placeholders xy at runtime
Post Reply