note 79150 added to function.imagepng
| From: | JeffSauro at osu1 dot php dot net | Date: | Tue, 13 Nov 2007 23:39:00 +0000 |
| Subject: | note 79150 added to function.imagepng | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-132235@lists.php.net to get a copy of this message | ||
My webserver, running 5.14 didn't like the header that was generated using imagepng(). It works
find on my local test server and on 4.x from another host.
The generated image displays in the browser (IE, firefox) but when saved to a file or inserted into
an RTF file, the image was corrupted. As a test, when attempting to right-click to save as, the
image format was not recognized.
The only work-around appears to be adding the additional paramaters.
So instead of just
imagepng($image); //DIDNT WORK--CORUPT IMAGE
This worked
imagepng($image,NULL,0,NULL);
and saving to disk, this worked:
imagepng($image,$file_location,0,NULL);
Jeff
----
Server IP: 208.69.120.35
Probable Submitter: 148.87.1.172
----
Manual Page -- http://www.php.net/manual/en/function.imagepng.php
Edit -- https://master.php.net/note/edit/79150
Del: integrated -- https://master.php.net/note/delete/79150/integrated
Del: useless -- https://master.php.net/note/delete/79150/useless
Del: bad code -- https://master.php.net/note/delete/79150/bad+code
Del: spam -- https://master.php.net/note/delete/79150/spam
Del: non-english -- https://master.php.net/note/delete/79150/non-english
Del: in docs -- https://master.php.net/note/delete/79150/in+docs
Del: other reasons-- https://master.php.net/note/delete/79150
Reject -- https://master.php.net/note/reject/79150
Search -- https://master.php.net/manage/user-notes.php