Snippets - Utilities
NOTE: Most of the IM snippets have been tested on IM version 6.3.5 There may be some differences if you are using the code on other versions.
Path - find automaticly - Anthony 15/6/2008
This will find the path to convert etc. automaticaly. But may not work on all setups.
<?php// In my case $HTTP_ENV_VARS[\'PATH\'] = bin:usr/bin$env_vars = explode( :, $HTTP_ENV_VARS[PATH]);// Combine the required part from $HTTP_ENV_VARS[\'PATH\'] and convert for your path.$env_path = $env_vars[1]."/convert";// Now $env_path = usr/bin/convert// Use like:exec("$env_path input.jpg -resize 100x100 output.jpg");?>
For more examples and information check out the main Imagemagick section.
Batch file ViewFonts installed View
Fonts Installed view View
Gravity option View
http image source View
Image information View
New image size in variable View
Path - find automaticly View
Path to Imagemagick View
Setup Information View
Shell script View
Variables in the code View
Version of Imagemagick installed View
Writing IM code View