Resize before watermark?

See all posts Reply

Resize before watermark? new!
by Ed, 16 years, 10 months ago
After uploading my images I want them resized to a particular dimension and then have a watermark placed over them.

The problem is that my script's implimentation of class.upload appears to first place the watermark over the image and then shrink the result, making my watermark very small. Is it possible to make class.upload resize before applying the watermark?Reply
Re: Resize before watermark? new!
by colin, 16 years, 10 months ago
The class actually resizes before applying the watermark

Can you post your code here, and link to your sample pictures?Reply
Re: Resize before watermark? new!
by Ed, 16 years, 10 months ago
My code looks like this:

$MyObjectImg = new upload($_FILES['thumbfile']);
if ($MyObjectImg->uploaded) {
  $MyObjectImg->file_auto_rename = true;
  $MyObjectImg->file_overwrite = false;
  $MyObjectImg->file_safe_name = true;
  $MyObjectImg->image_x = 320;
  $MyObjectImg->image_y = 180;
  $MyObjectImg->image_ratio_crop = true;
  $MyObjectImg->image_convert = "jpg";
  $MyObjectImg->jpeg_quality = 85;
  $MyObjectImg->image_watermark = 'playbutton.png';
  $MyObjectImg->process($path);
  if ($MyObjectImg->processed)  {
    $uploaded = true;
    $thumbfilename = $MyObjectImg->file_dst_name;
  } else
    $uploaded = false;
  $MyObjectImg->clean();
}

The watermark image can ve viewed at http://www.edjeavons.co.uk/playbutton.png

It works fine if I upload an image that's already 320x180px, but for larger images the symptoms suggest that it's placing the watermark first and reducing.Reply