ImageMagick error

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
User avatar
zeveck
Forum Newbie
Posts: 15
Joined: Mon Oct 17, 2005 7:23 pm
Location: Mountain View, CA

ImageMagick error

Post by zeveck »

I am calling ImageMagick using exec(). I have ImageMagick working fine when running my app on Linux, but convert crashes when I make the equivalent calls on Windows. Any ideas?

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

Post by feyd »

Additional information necessary. Example: errors you're getting, code you're using, the basic stuff...
User avatar
zeveck
Forum Newbie
Posts: 15
Joined: Mon Oct 17, 2005 7:23 pm
Location: Mountain View, CA

Post by zeveck »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Sorry. ^_^;;

All I am getting for error is that convert crashes, like Windows pops up an illegal operation dialog or some such. I can check exact wording when I get home, but it's the generic "this application has crashed" type dialog.

Code: Select all

function resize($input_image, $output_image, $max_height, $max_width) {
  $convert_cmd = "convert $input_image -resize {$max_width}x$max_height! $output_image";
  $convert_cmd = escapeshellcmd($convert_cmd);
  shell_exec($convert_cmd);
}

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Post Reply