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.
exec("convert sunflower.jpg -thumbnail 200x90 -background black +polaroid poloroid.png");
This is using the +polaroid operator. It will add a border, rotate, add a shadow and curl the image edge. Using +polaroid gives a random rotation. Using -polaroid 10 will give a 10 degree rotation specifed by the user.