ImageMagick...again =) ImageMagick...again =)
 

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...again =)

Started by Xistence, November 06, 2003, 08:24:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Xistence

Hey guys,

I'm trying to get Coppermine working with ImageMagick but I ran into a
little(?) problem. As most of you already guessed, it won't create thumbnails  :cry:
At first I thought ImageMagick wasn't installed correctly until I got this
php script which uses ImageMagick aswell to create thumbnails.

Here's the code it uses:
(full script at http://michiel.steman.nl/test.txt)

// thumbnail handling
  $imconvert='/usr/local/bin/convert'
exec($imconvert.' -quality 70 -geometry 80X50 '.$docroot.$listdir.'/'.$file.'
'.$docroot.$listdir.'/'.$name[0].'_tedlsthumb.jpg');
       
This script makes thumbnails perfectly..I'm kinda curious why it isn't doing the
same job with Coppermine.

Asfar as I can see Coppermine uses the following command:

passthru("{$CONFIG['impath']}convert -quality $CONFIG[jpeg_qual] -antialias
-geometry {$destWidth}x{$destHeight} $src_file -");

Looks pretty much the same to me except the "-antialias" part

Does anyone know/has an idea why the thumbnail part it isn't working with
Coppermine and/or know how to solve this issue?

I know you suggest people to use GD instead of ImageMagick but I'd really
like to get Coppermine working with IM

Thanks in advance

  -Xis

moorey

Ok without looking at your setup/config, it's hard to say. Is there any reason why you want to use IM over GD? What CPG version are you using? What's the exact problem? Just thumbnails? What server setup are you running on?

hyperion

:?:  :!:

Where did you get your version of Coppermine, and what file did you pull that command from?


That is not Coppermine's standard thumbnail command.  This is:


$cmd = "{$CONFIG['impath']}convert -quality {$CONFIG['jpeg_qual']} {$CONFIG['im_options']} -geometry {$destWidth}x{$destHeight} $src_file $im_dest_file";
exec ($cmd, $output, $retval);


Your command would send raw data to STDOUT.
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

Xistence

Hey again,

First of all thanks for your replies =)
I just installed a clean version of Coppermine (1.2.0) on a SunOS enterprise 5.8. The box owner doesn't want to install GD cause IM is already installed  :?

I got the command from showthumb.php..obviously I had to take the command from picmgmt.inc.php sorry.

Still leaves me with the same problem. It doesn't make thumbnails with coppermine while it does with the other script. Although both commands look pretty much similar

(Some script. Source at http://michiel.steman.nl/test.txt )
// thumbnail handling
$imconvert='/usr/local/bin/convert'
exec($imconvert.' -quality 70 -geometry 80X50 '.$docroot.$listdir.'/'.$file.'
'.$docroot.$listdir.'/'.$name[0].'_tedlsthumb.jpg');

(Coppermine)
$cmd = "{$CONFIG['impath']}convert -quality {$CONFIG['jpeg_qual']} {$CONFIG['im_options']} -geometry {$destWidth}x{$destHeight} $src_file $im_dest_file";
exec ($cmd, $output, $retval);

It gives me this error: Error executing ImageMagick - Return value: 1

So for some reason it wont execute IM or IM returns an error when it's being run with those param.

*confused*

anyone?

DJMaze

Does you Coppermine config screen has the correct path to IM ?

If that other script works the config should say: /usr/local/bin/
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0

moorey

Quote from: "Xistence"It gives me this error: Error executing ImageMagick - Return value: 1

So for some reason it wont execute IM or IM returns an error when it's being run with those param.

Return value 1 usually means it's the wrong path to convert, or the wrong convert. Do you have shell access to the server? Try run the command there instead, and see if you have the right permission to actually have access to the "convert" utility.

Otherwise, try these other path to IM in CPG:
Quote/usr/bin
/usr/X11R6/bin
/usr/bin/convert