Page 1 of 2

How to put words over images [56k warn]

Posted: Thu Dec 28, 2006 12:53 pm
by nickman013
Hello,

I have a website with images, I have words in that image, that I want to change based on data that comes out of a database. I dont know if this is possible or if anybody has any idea or how to, or a link that will teach me (ive searched google), I would greatly appreciate it...

My basic layout:
http://www.regionalplanning.com/basic_layout.jpg

That is the link to the layout I have created, as you can see I have variables everywhere, that Is what I used to represent the words I need to be placed in its spot.
I know how to get information out of the database, I just dont know how I would make the words in the picture change, is it possible to do this with PHP because I have scene a image before that looked like this yourtown.gif?town=New_York_City and then the picture said your town is New York City, and stuff like that, I then changed the New_York_City to dfjdojdofjfd and it said your town is dfjdojdofjfd. So I am basically looking for somthing like that.

Thanks Alot!!!!

Posted: Thu Dec 28, 2006 12:56 pm
by Luke
this may help you... http://bokehman.com/watermark maybe.

Posted: Thu Dec 28, 2006 1:04 pm
by nickman013
I was looking at somthing similar to that, but I cant figure out how to make it go into the correct spot of the image, and instead of watermarking a image, text.

Posted: Thu Dec 28, 2006 1:10 pm
by nickman013
like this picture is a perfect example..

Image[/img]

Posted: Thu Dec 28, 2006 1:13 pm
by Luke

Posted: Thu Dec 28, 2006 1:17 pm
by Burrito
GD is your answer.

have a look at this function: imagettftext()

Posted: Fri Dec 29, 2006 7:57 am
by neel_basu
You Can Do It In 2 different Ways
=======================
1. Use GDlib / Watermark

2. Put Your Picture In a Div With z index=1 And Parse Text from The Database
And Put It In a Div Which Has z index=2 And Then Place The Text Div Over
The Image Div

Posted: Sat Dec 30, 2006 3:41 pm
by nickman013
Which way would look nicer, and would the div move if the page is in a different resolution or somthing?

Thanks Alot !

Posted: Sat Dec 30, 2006 11:11 pm
by neel_basu
The First Process Is very good But it would a very little more codes
Second Process Is Also Good It would take little less code
nickman013 wrote:and would the div move if the page is in a different resolution or somthing?
I've not tested it before Pls Test It First

Posted: Tue Jan 02, 2007 11:11 pm
by nickman013
I am going to make a template for the words I want over it, and have the information I want over the picture in a table that is resized perfectly for the picture. I am going to open the image in Photoshop and make a slice where the info will be posted so I can edit the image using GD, and just keep editing the information in the template. Does that sound like a working idea?

Posted: Tue Jan 02, 2007 11:18 pm
by neel_basu
Look If What You are trying to do is possible also not only by GD Then Why Would You Use GD . It Would Take Time Depending on your image.

So If Its Possible overlapping div(s) only Why Wouldn't You Use It

Posted: Wed Jan 03, 2007 5:32 pm
by nickman013
I see what your saying, DIVS would be alot easier.. But the thing is would they stay in the right position always, and never movie if the page is resized or somthing?

Posted: Wed Jan 03, 2007 11:33 pm
by neel_basu
nickman013 wrote:I see what your saying, DIVS would be alot easier.. But the thing is would they stay in the right position always, and never movie if the page is resized or somthing?
Ya Thats Right
But when user is resizing his/her browser It doesn't make that much defecultes
the defeculties are on the different screen resoulution
You may Create different pages depending on their screen resoulution and then forward thm to their approeat page

Posted: Thu Jan 04, 2007 10:33 am
by feyd
"difficulties"
"appropriate"
"resolution"
;)


Using an HTML solution banks on the person viewing it having the correct fonts and allowing the size(s) you use. If the fonts are off by a bit your "image" will likely look like poop-on-a-stick.

Posted: Fri Jan 05, 2007 2:25 pm
by nickman013
Yea thatrs what Im worried of, so should i go with phpgd ?