缩图过程中,如果图片解析度(接近2000x2000)或图片size大小很大时,便会超过memory limit,为何会这样?除了改php.ini的Memory limit设定外,没其他办法吗?要处理大的解析度就须要更多内存?php memory limit预设是16M
imagecreatefromjpeg($imagefile);Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 7520 bytes) in /var/www/html/test/includes/image.php on line 43
imagecreatefromjpeg($imagefile);Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 7520 bytes) in /var/www/html/test/includes/image.php on line 43
你的图片可能是>=4M + 其他一些消耗就超过16M了,
这时间gd做运算的过程中memory不足
不知道调用外部程序用的内存算不算在php之内,如果不算可以考虑imagemagic