ImageMagick help please

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
g00fy_m
Forum Newbie
Posts: 7
Joined: Mon Feb 21, 2005 1:46 am

ImageMagick help please

Post by g00fy_m »

hi to all,

can someone tell me why this does not generate the thumbnail please?

this is output from convert -version

Code: Select all

Version: ImageMagick 6.2.3 06/08/05 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2005 ImageMagick Studio LLC

Code: Select all

$exec_cmd = "convert -geometry ";
$exec_cmd .= $thumbnail_width."x".$thumbnail_height." ";
$exec_cmd .= $local_photo_dir."/".$images_dir."/".$filename . " " . $local_photo_dir."/";
$exec_cmd .= $images_dir."/tb_".$filename;

print $exec_cmd;

exec($exec_cmd);
resulting in

Code: Select all

convert -geometry 100x99 C:/www/php_gallery/photos/39.jpg C:/www/php_gallery/photos/tb_39.jpg
if i run this from console (exact copy/paste from above in WinXP Pro SP2) it all works well and generates the thumbnail. But it will not generate it from web page.

any help please would be great.

kind regards,
g00fy
g00fy_m
Forum Newbie
Posts: 7
Joined: Mon Feb 21, 2005 1:46 am

Post by g00fy_m »

i can get it going with GD2, but still no luck with ImageMagick.

regards,
g00fy
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

it's very likely a run permissions issue between your server and windows. If you server is running as a service, it's not being run as you, so it doesn't have access to your environment. You may need to set the service to run interactively with the desktop, this can help.. using the full path to ImageMagick will also probably help..
g00fy_m
Forum Newbie
Posts: 7
Joined: Mon Feb 21, 2005 1:46 am

Post by g00fy_m »

tried that but it still doesnt work, sorry should have posted that i tried it earlier.

is there a way to log ImageMagick?

regards,
g00fy
Post Reply