I have some code that adds some headers to an image:
Contents of file
<?php
$im = imagecreatefromjpeg($filepath);//full path
imagejpeg($im);
imagedestroy($im);
?>
This imagecreatefromjpeg function is giving internal server error when image is big. otherwise working
so i tried to increase memory limit
ini_set('memory_limit', '1024M'); // or you could use 1G
but same problem. Any solution? Thanks
UPDATE:
Error is
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 51024 bytes)
Image Dimensions:
Width: 12756 px
Height: 22677 px
Size: 11.6 MB