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.

Another label example

Another label example example
Another label example example
 
exec("montage -geometry +0+0 -background skyblue -label \"Sunflower\" $input14 label_montage1.jpg"); 

//Alternative method 
$size = getimagesize( $input14 ); 

$cmd = " $input14 ( -size {$size[0]}x30 ". 
" -background skyblue -fill black ". 
" -pointsize 16 -gravity center ". 
" caption:\"Sunflower\" -flatten ) -append "; 
exec("convert $cmd caption_size.jpg");

You would need to escape the ( ) if on a Linux machine.


Back