puting a table to image

GD and GD2 are useful libraries for creating graphics on-the-fly. Discuss your PHP GD and GD2 scripts here.

Moderators: onion2k, General Moderators

Post Reply
sara933
Forum Newbie
Posts: 11
Joined: Thu May 15, 2008 10:01 am

puting a table to image

Post by sara933 »

hi :)
I want to create a table(contanines some tiny images gotten of a database randomly) and put in to a background(for examle 400*400 pixels), how can i do this?
how can i change it to one image that seems one image and non seperatable?
best regard
Last edited by onion2k on Sun Jun 01, 2008 9:37 am, edited 1 time in total.
Reason: There's no need to make your text bigger than normal.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: puting a table to image

Post by onion2k »

It can be done very easily with imagecopy(). Create a 400*400 image using imagecreate() or imagecreatetruecolor(), then open the individual images using imagecreatefromjpg() (or imagecreatefromstring() if the actually image data is in the database), and copy them to the place you want them in the big image.
sara933
Forum Newbie
Posts: 11
Joined: Thu May 15, 2008 10:01 am

Re: puting a table to image

Post by sara933 »

hi onio2k
if i want to put images in a table first and then put that image to background ,dose this way works?
regards
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: puting a table to image

Post by onion2k »

No idea what you mean.
Post Reply