Forum Moderators: coopster

Message Too Old, No Replies

Using GD to create graphics on the fly

umm..any scripts out there to get me started?

         

mcbsolutions

5:42 pm on Jul 1, 2003 (gmt 0)

10+ Year Member



Hi everyone,
I'm wanting to use PHP and GD to create graphics on the fly. I'm a newbie with PHP, but a very good cut and paster, lol.

Here's what I need:

I'm in the label business and want customer to be able to preview the label before buying. So, customer types in input boxes:

Name: John Doe
Address: 100 Your Street
CSZ: Anywhere, NY 10022

And then selects fonts for each line of text:
Font Line 1 - Helvetica Bold
Font Line 2 - Helvetica
Font Line 3 - Helvetica

Then when clicking a button, they view their label in an image that is created on the fly.

I am using OScommerce and would like to incorporate this into the ordering process. Can anyone help out?

Thanks much!

Steve

moltar

5:51 pm on Jul 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can start by reading over here, there are lots of examples too:

[ca.php.net...]

wruk999

6:00 pm on Jul 1, 2003 (gmt 0)

10+ Year Member



Hi Steve,

If you are looking at programming this yourself, then as moltar has pointed out, you are best off looking at the php manual.

However, if you are looking for a ready made script, you could check out hotscripts.com under the php/scripts_and_programs/images_manipulation tree. You will find an "image creation" category, and there are some good scripts there which will possibly help you. :)

Cheers,
wruk999

mcbsolutions

6:21 pm on Jul 1, 2003 (gmt 0)

10+ Year Member



Thanks moltar and wruk!

I found something at hotscripts.com that might work. I wish I was up to speed to simply code all of it from scratch. If I see other's work, that's how I learn.

thanks!

Sander

1:09 am on Jul 2, 2003 (gmt 0)

10+ Year Member



PHP manipulated or created images are just things you don't want to put too much of on one page.

It takes quite some time for the server to perform these commands, and renders it slow, and in my case, often crashes it. You may be better off using the label image as a background of a table and putting the content as regular text in it.

If you want to use nice fonts, you're better off with imagemagick indeed.