Snippets - Utilities

Snippets index page

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.

Variables in the code - Anthony 15/6/2008

A couple of methods of using variables in the code

  1. <?php
  2. $size getimagesize('sunflower.jpg');
  3. // You can also use ' or \" instead of { }
  4. exec("convert -size {$size[0]}x{$size[1]} input_image.jpg -resize 100x100 output_image.jpg");
  5. //
  6. // If you have a long path I find it easyer to put the path into a variable.
  7. $input_image "folder1/folder2/input_image_12345.jpg";
  8. exec("convert $input_image output_image.jpg");
  9. ?>

For more examples and information check out the main Imagemagick section.

Batch file View

Fonts 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