ImageMagick - Edit Images / Not Rotating ImageMagick - Edit Images / Not Rotating
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

ImageMagick - Edit Images / Not Rotating

Started by gsownsby, October 11, 2004, 06:59:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gsownsby

I have Coppermine 1.3.2 up and running on my home web server.  I also installed ImageMagick and correctly specified the path in the setup/config for Coppermine.  When logged in as Admin, I can pull up an image and click "Crop and Rotate" but the rotation does not occur.  The image 'blinks" out for a second then appears just the same...no changes.  Any thoughts on what may be wrong?  Thanks.

All other Coppermine functions appear to be working.  I've double-checked the path to ImageMagic which is c:/imagemagick


Other Configuration Info:  Windows XP Professional; Abyss Web Server; MYSQL; ImageMagick

kegobeer

Open up include/imageObjectIM.class.php.

Find
$cmd = "{$CONFIG['impath']}convert -quality {$this->quality} {$CONFIG['im_options']} -crop '{$new_w}x{$new_h} +{$clip_left} +{$clip_top}' $imgFile $imgFile";

Replace with:
$cmd = "{$CONFIG['impath']}convert -quality {$this->quality} {$CONFIG['im_options']} -crop {$new_w}x{$new_h}+{$clip_left}+{$clip_top} $imgFile $imgFile";

Find
$cmd = "{$CONFIG['impath']}convert -quality {$this->quality} {$CONFIG['im_options']} -rotate '$angle' $imgFile $imgFile";

Replace with
$cmd = "{$CONFIG['impath']}convert -quality {$this->quality} {$CONFIG['im_options']} -rotate $angle $imgFile $imgFile";

Also look in your php.ini file for variables_order or gpc_order (depending on your php version, gpc_order is depreciated).  The common order is "GPC" or "GPCS".  In order for $_ENV to work it needs to be "GPCE" or "GPCES".  If you don't want to mess with your php.ini file, make these changes in imageObjectIM.class.php:

Find all instances of

eregi("win",$_ENV['OS']

and replace with

eregi("win",getenv('OS'))
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

gsownsby

Kegobeer,

Thank you for your reply.  Your solution worked.  As I read it, basically it was to remove a single quote mark in a few places and add the GETENV statements.

Just out of curiosity, is this "fix" documented somewhere and I missed it?  Thanks again.

gsownsby

kegobeer

No, I fixed this in the devel version, but forgot to apply the fix to the current stable version.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Alejandrito

greit!!

now works for me too :D thanks very much