开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜