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.
$cmd = "-blend 88 -gravity northeast bluetest.jpg $input10 -matte";
exec("composite $cmd blue.jpg");
// Alternatively you could use the "Colorize" operator.
exec("convert flowers.jpg -fill blue -colorize 50% blue.jpg");
//This gives a different effect when used on a black and white image.
exec("convert black_white.jpg xc:blue -size 1x1 -fx \"u*v.p{0,0}\" blue.png");
The colours can be different and the amount of transparency can be altered with the -blend 88 value.