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.

Image

Add an image watermark

Image example
 
$cmd = " -watermark 30% -gravity center $input15 $input14 ";
exec("composite $cmd watermark_image1.jpg");

Path to composite on your server = composite Watermaking an image with a logo and the opacity = -watermark 30% Location of the watermark ( based on compass points e.g. north, south, northeast etc. ) = -gravity northeast Image to use as the watermark ( including path ) = boots.png The original image ( including path ) = House.jpg The new image ( including path ) to save = watermark_image1.jpg


Back