Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 112496

bluecomet on "ImageMagick cropping fail on Hostpapa /Wordpress 3.5"

$
0
0

I dug into WordPress code some more and reproduced what it was doing on my own test file outside of WordPress as follows:

< ? php

/* This line below will cause cropImage to fail */
Imagick::queryFormats( 'JPG');

$img = new Imagick('leonids.jpg');
$img->writeImage('testresult16.jpg');
$img->cropImage(150,150,0,0);
$img->writeImage('testresult16-crop.jpg');

? >

Wordpress does a queryFormats call which causes cropImage to fail. Either with just a blank screen, or internal server error or a memory error if the file is large. Leaving it out will work, even on large images. ImageMagick 6.4.8 2011-02-03 Q16

Waiting to hear back from Hostpapa.


Viewing all articles
Browse latest Browse all 112496

Trending Articles