Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: ImageMagick...again =)  (Read 5959 times)

0 Members and 1 Guest are viewing this topic.

Xistence

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
ImageMagick...again =)
« on: November 06, 2003, 08:24:58 pm »

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
Logged

moorey

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 404
ImageMagick...again =)
« Reply #1 on: November 07, 2003, 03:46:35 am »

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?
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
ImageMagick...again =)
« Reply #2 on: November 07, 2003, 05:31:17 am »

:?:  :!:

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:

Code: [Select]

$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.
Logged
"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://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=f0873409e7b0238c9b018100632837e3)

Xistence

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
ImageMagick...again =)
« Reply #3 on: November 09, 2003, 03:39:37 pm »

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?
Logged

DJMaze

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 831
    • Dragonfly CMS
ImageMagick...again =)
« Reply #4 on: November 09, 2003, 09:19:18 pm »

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

If that other script works the config should say: /usr/local/bin/
Logged
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

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 404
ImageMagick...again =)
« Reply #5 on: November 10, 2003, 02:59:56 am »

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
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.