PHP imagecreatefromjpeg在大图像上失败

时间:2017-08-03 01:31:55

标签: php image gd

我的图像大约有5000x3000像素,我想在PHP中使用imagecreatefromjpeg函数,但图像只是空白。当我尝试使用较小的一个时它工作得很好。我尝试将memory_limit设置为800M,还设置为ini_set('memory_limit', -1);

我的代码:

header("Content-type: image/png");
ini_set('memory_limit', -1);
error_reporting(E_ALL);

$img1 = imagecreatefromjpeg("1.jpg");
$img2 = imagecreatefromjpeg('2.jpg');

imagecopy($img1, $img2, 605, 109, 0, 0, 200, 200);

imagepng($img1);
imagedestroy($img1);

输出: Output

错误: Errors

我还能做什么

0 个答案:

没有答案
相关问题