Hello,
I'm trying to create grayscale image from input image. Input image is 3MB large, resolution is 4288x2848x24BPP
When I run the script, it ends in Fatal Error: Allowed memory size...
So I've assigned 100M to memory_limit and it still doesn't work. It works when memory limit is set to 200M, but in my opinion it's to big for 3MB large image. The server has only 512MB of RAM.
Is there something wrong with my code?
$imageName; // path to 3MB large image
$img = imagecreatefromjpeg($imageName); // this is where the script dies: Fatal Error...
imagefilter($img, IMG_FILTER_GRAYSCALE);
imagejpeg($img, $greyScaleImage, 100);
imagedestroy($img);
Thanks for help, or any advice how to achieve grayscaled image