class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
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
$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.