Reply to Re: Add TWO watermarks in the same image

Re: Add TWO watermarks in the same image new!
by colin, 16 years, 8 months ago
It is normal. The $ImgMod->image_watermark is not a method, it is a property. So the second time you set it, you remove the first value that you put there.

In order to add two watermarks, you need to call Process() twice.

For instance, something like this:
$ImgMod = new Upload($ImagemCompleta);
$ImgMod->file_auto_rename = false;
$ImgMod->file_overwrite = true;
	
if ( file_exists($Marca1) == true ) {
  $ImgMod->image_watermark = $Marca1;
  $ImgMod->image_watermark_position = 'T';
}	

$ImgMod->process( $PastaTemp );

$ImgMod = new Upload($PastaTemp);
$ImgMod->file_auto_rename = false;
$ImgMod->file_overwrite = true;

if ( file_exists($Marca2) == true ) {
  $ImgMod->image_watermark = $Marca2;
  $ImgMod->image_watermark_position = 'BR';
}	

$ImgMod->process( $PastaTemp );
Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important