I spent the whole day trying to add watermarks to images. It works, but only in this way:
==============
$cfgComposite = '/usr/bin/X11/composite';
$cfgLogoPlacement = 'south';
$cfgImageLogo = '/home/virtual/site1/fst/var/www/html/watermark.png';
$thumbFileName = '/home/virtual/site1/fst/var/www/html/modules/gal/album/album1/b13.jpg';
$thumbFileName1 = '/home/virtual/site1/fst/var/www/html/modules/gal/album/album1/b13.jpg';
When I try to add variables, nothing happends:
$userdata=cookiedecode($user);
$username = $userdata[1];
$folder = $username{0};
$path = '/home/virtual/site1/fst/var/www/html/modules/gal/album/';
$picture = '$image';
$cfgComposite = '/usr/bin/X11/composite';
$cfgLogoPlacement = 'south';
$cfgImageLogo = '/home/virtual/site1/fst/var/www/html/watermark.png';
#$thumbFileName = $path . $folder. $picture;
#$thumbFileName1 = $path . $folder. $picture;
exec($cfgComposite . ' -compose over -gravity ' . $cfgLogoPlacement . ' ' . $cfgImageLogo . ' ' . $thumbFileName . ' ' . $thumbFileName1);
I changed this script many times to get it work, but no success...
Any idea?