0

I have a basic imagemagick script that works fine on windows, but wheni run it on the linux server (shared / hostgator) the images get created but the shave command doesnt get applied. The code im using is here:

 $exp=path/to/file.jpg
 $size = getimagesize("$exp");
 $diff=abs($crop_h-$size[1]);
 $shave = round($diff/2,0,PHP_ROUND_HALF_DOWN);

 exec("convert $exp -shave  0x".$shave." $exp ");

thats it. works on localhost/windows but not live/linux. The images get generated (indicating IM is working), but the sides do not get shaved.

Any ideas?

FstaRocka
  • 278
  • 1
  • 2
  • 15

1 Answers1

0

PHP_ROUND_HALF_DOWN requires 5.3+ and I was running 5.2. Upgraded and its working now -

:)

FstaRocka
  • 278
  • 1
  • 2
  • 15