my image has about 5000x3000 pixels and I want to use the imagecreatefromjpeg
function in PHP, however the image keeps just empty. When I try it with a smaller one It is working perfectly. I tried to set the memory_limit
to 800M and also ini_set('memory_limit', -1);
.
My code:
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:
What else can I do