RE: [PHP] image creation to file
| From: | Craig Westerman | Date: | Thu, 07 Mar 2002 02:56:06 +0000 |
| Subject: | RE: [PHP] image creation to file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-87563@lists.php.net to get a copy of this message | ||
Hi Tom,
At first it didn't work. I had to create a blank png image in Photoshop and
uploaded it. I then changed file permissions and then the image creation
worked. Is there a way to write to test.png when it doesn't already exist
and file permissions are set?
Thanks for your help.
Craig ><>
westerman@chanuteks.com
Hi
use ImagePNG($im,"test.png")
Tom
At 12:17 PM 7/03/2002, Craig Westerman wrote:
>The following creates a red rectangle png image
>
><?
>Header("Content-Type: image/png");
>$im = ImageCreate(500, 75);
>$red = ImageColorAllocate($im, 255, 0, 0);
>ImageFill($im, 100, 100, $red);
>ImagePNG($im);
>?>
>
>
>This sends created image to browser
>ImagePNG($im);
>
>
>How would I save this image as test.png to file to be hard coded in static
>web pages?
>
>Thanks
>
>Craig ><>
>westerman@chanuteks.com