Rubblewebs

THESE CODES ARE PROVIDED FOR AN EXAMPLE OF HOW TO USE IMAGEMAGICK WITH PHP. CARE SHOULD BE TAKEN WHEN ACCEPTING USER INPUT.

I TAKE NO RESPONSABILTY FOR ANY PROBLEMS THAT MAY OCCURE WHEN USING ANY OF THIS CODE.

IT IS UP TO YOU TO SECURE THE CODE AND VALIDATE USER INPUT.

Installation notes - XAMPP:

Download and install XAMPP

Download and install ImageMagick.

  1. Start XAMPP
  2. Run this code in your browser to prove it is installed and working.
    
    header("Content-Type: text/plain"); 
    system("convert -version"); 
  3. Use the code like this and run it in your browser:
    exec("convert input.jpg -thumbnail 100x100 output.jpg");
    

Note: You will need to use " not ' when using draw or annotate as this is a windows installation. The " will need escaping if you are writing the code like exec("convert ......
localhost must be running for the code to work.