I'm using an ajax call to send dynamic crop values (width, height, x, y) to a php script. When user submits a small cropping area everything works fine, imagick returns the correct image.
But the larger the cropping area is the greater the chance that php script stops at "$picture->writeImage($outFile);" in my tmp folder where the croped image is saved there spawns an image file with no information in it.
To make it simple i replaced the dynamic cropping values with just static values, to see that nothing else is interfering...
I don't know how to debug whats going wrong, and why larger areas of cropping makes it crash.
The images users inputs could be large image files, my test image is 12,3 MB and 5616 x 3338.
Im running CentOs, before I developed the function on my local computer with Windows 7 and Wamp-server. Before i moved over from local server everything worked.
Code: Select all
$picture = new Imagick($_SERVER['DOCUMENT_ROOT']."/orginal_53064950710a4.jpg");
$picture->cropImage( 5000, 3000, 0, 0);
$picture->writeImage($outFile);
$picture->clear();
$picture->destroy();
Any help is appreciated!!
Really been trying to find an solution for this Thanks for taking your time helping me!