GD+PHP: Exception to see if imagefail fails?
imagetruecolortopalette($dst_image,true,$colorcount);
imagepalettecopy($dst_image,$src_image);
$transparentcolor = imagecolortransparent($src_image);
imagefill($dst_image,0,0,$transparentcolor);
imagecolortransparent($dst_image,$transparentcolor);
So I want something开发者_JAVA百科 like: if imagefill fails unlink exit with error else continue with imagefill
Or: if imagefill takes more than X seconds unlink exit with error else continue with imagefill
Any ideas? Please help.
I ended up switching over to imagemagick.
-Two times faster. -Uses less memory. -No more errors.
精彩评论