Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving PHP Generated Images

Status
Not open for further replies.

WintersMystic

Programmer
Aug 8, 2001
39
US
i am learning how to create images with php. i have it going pretty good, but now im wondering if it is at all possible to save the image into .jpg .png or .gif formats?

if so how?

also, on ImageColorAllocate($im, 225, 0, 0); is it possible to send the numbers from three form text boxes to 225, 0, 0 ? ive tried

ImageColorAllocate($im, $One, $Two, $Three);

thank you :)

P.S. im working on a webhost, i dont have PHP on my PC
 
Take a look at:

There it says:
"int imagepng (int im [, string filename])

The ImagePNG() outputs a GD image stream (im) in PNG format to standard output (usually the browser) or, if a filename is given by the filename it outputs the image to the file. "



So I guess you have a row that says:
imagepng($im);

change that into:
imagepng($im, "/tmp/filename.png"); # or wherever you want it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top