note 17974 modified in function.imagecreatefromjpeg by alindeman
| From: | alindeman@php.net | Date: | Sun, 11 May 2003 17:47:46 +0000 |
| Subject: | note 17974 modified in function.imagecreatefromjpeg by alindeman | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-47844@lists.php.net to get a copy of this message | ||
[Ed Note: You must have netpbm installed for this to work --alindeman @ php.net]
Just wanted to let you know that
imagecreatefromjpeg crashes php
(command line at least) sometimes with segmentation fault when jpeg is corrupted.
To get rid of the nasty segmentation fault i used
system ("jpegtopnm f.jpg > f.pnm", $r);
if ($r != 0) {printf ("invalid jpeg\n"); return; }
system ("pnmtopng f.pnm > f.png");
$im =imagecreatefrompng ("f.png");
--was--
Just wanted to let you know that
imagecreatefromjpeg crashes php
(command line at least) sometimes with segmentation fault when jpeg is corrupted.
To get rid of the nasty segmentation fault i used
system ("jpegtopnm f.jpg > f.pnm", $r);
if ($r != 0) {printf ("invalid jpeg\n"); return; }
system ("pnmtopng f.pnm > f.png");
$im =imagecreatefrompng ("f.png");
http://www.php.net/manual/en/function.imagecreatefromjpeg.php