freakus_maximus Posted June 21, 2006 Share Posted June 21, 2006 Is there something similar to this that I can use to verify that Image Magick is working?[code]<?PHP print_r(gd_info()); ?>[/code]I have checked and made sure the extensions are enabled in php.ini.But the script I am running generates a the form, but no image, just the missing image "x". No errors or anything else.I actually have a variation of the script running that does not use image magick commands and it works fine. Here is the code I am not using, but want to:[code]# prepare our image magick command$cmd = '/usr/bin/convert';$cmd .= ' -font "'.$font.'"';$cmd .= ' -fill "#'.$color.'"';$cmd .= ' -pointsize '.$size;$cmd .= ' -gravity "'.$gravity.'"';$cmd .= ' -draw \'text 0,0 "'.$textstr.'"\'';$cmd .= ' -rotate '.$angle;$cmd .= ' ./'.$im.' ./images/tmp/'.$tmpname;[/code]If you cannot tell, I am creating a security image and can do this fine with the script that does not use the image magick. But the security text is flat and this commands above are to twist and angle each alphanumeric to help keep it from being easily picked apart. Quote Link to comment https://forums.phpfreaks.com/topic/12559-how-to-check-if-image-magick-is-working/ Share on other sites More sharing options...
zq29 Posted June 21, 2006 Share Posted June 21, 2006 You could try this:[code]<?phpexec("mogrify",$out)echo "<pre>"; print_r($out); echo "</pre>";?>[/code]It should print the instructions on how to use the mogrify command in ImageMagick. (Don't forget the semi-colon on the end of exec() - left out on purpose due to forum bug!) Quote Link to comment https://forums.phpfreaks.com/topic/12559-how-to-check-if-image-magick-is-working/#findComment-48154 Share on other sites More sharing options...
freakus_maximus Posted June 21, 2006 Author Share Posted June 21, 2006 That worked, it printed out:[code]Array( [0] => Version: ImageMagick 6.2.8 06/02/06 Q16 http://www.imagemagick.org [1] => Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC [2] => [3] => Usage: mogrify [options ...] file [ [options ...] file ...] [4] => [5] => Where options include:(I snipped the middle of this so it was not a huge post) [178] => image type as the filename suffix (i.e. image.ps). Specify 'file' as [179] => '-' for standard input or output.)[/code]So, I guess that means it is installed and working correctly and the script is just screwy...lolI will just have to troubleshoot the script then, probably some pathing issue.Thanks SemiApocalyptic! Quote Link to comment https://forums.phpfreaks.com/topic/12559-how-to-check-if-image-magick-is-working/#findComment-48165 Share on other sites More sharing options...
zq29 Posted June 21, 2006 Share Posted June 21, 2006 Yep, looks like its installed and working! Happy to help [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /] Quote Link to comment https://forums.phpfreaks.com/topic/12559-how-to-check-if-image-magick-is-working/#findComment-48193 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.