Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Graphics and PHP?

How to manipulate images with php



7:47 pm on Aug 20, 2002 (gmt 0)

I am currently using perl cgi scripts to manipulate an image. This consists of piecing several smaller images into a larger single image (gif).

However, I would like to get away from perl and use PHP instead. Is there any way to do this kind of image creation using PHP? Or am I stuck with calling a perl function from PHP?

Say the program to build the image is build_img.cgi and is located in a cgi directory and my PHP is located in one of my web folders. How would I call the cgi script from a PHP program?



11:43 pm on Aug 20, 2002 (gmt 0)

10+ Year Member

ipscone welcome to WebmasterWorld! I hope you enjoy your stay. I dont have your exact answer but I know its possible I have just never tried it. Here is a link to Image Functions [php.net] at php.net [php.net]. These will tell you how to do it. If your lucky this bump might catch the attention of someone who had done this with PHP and will be able to help you further. Sorry you I couldnt be of more help and once again welcome to WebmasterWorld.


11:47 pm on Aug 20, 2002 (gmt 0)

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Welcome to WebmasterWorld ipscone,

Knowles nailed the links that I was going to post but I haven't tried this yet either. I have been toying with some ideas I have for using it but haven't really had the time to do it yet.

Keep us posted I would be interested to hear how it works for you. Those links should get you what you need.


11:51 pm on Aug 20, 2002 (gmt 0)

10+ Year Member

From what I just read on this you will have to have GD installed with your PHP and it doesnt support Gif anylonger. So you may have to chose a different format.


11:58 pm on Aug 20, 2002 (gmt 0)

I'm using GD already and with gif. Guess I'm using an older version. But I can use jpg just as well.

Also, the links are not working for some reason.



12:00 am on Aug 21, 2002 (gmt 0)

10+ Year Member

[php.net...] Here is the actuall URL sorry I am not sure why its not working its dropping the http off of it.


2:07 am on Aug 22, 2002 (gmt 0)

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Seems I just scored the large contract that means I have to learn how to do this. A large application with tons of dynamic image alteration.

I guess that means I will make time to learn this, always nice when someone pays for you to learn new tricks though. ;)


2:27 am on Aug 22, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

You might also want to look at zend.com file library.

I use PHPlot by Afan Ottenheimer. It allows me to create various charts and graphs on the fly into various graphics formats.

You can find his stuff here: [sourceforge.net...]


Featured Threads

Hot Threads This Week

Hot Threads This Month