Hello everybody. Is it possible to add watermark to the uploaded images? I tried to make it myself, but without any result.
I wrote thiscode and added it to qa-util.image.php:
//watermark add-on
$watermarkfile = 'watermark.png';
$watermark = imagecreatefrompng($watermarkfile);
// width and height of the watermark
$x2 = imagesx($watermark);
$y2 = imagesy($watermark);
$wmwidth = $width - $x2 - 10;
$wmheight = $height - $y2 - 10;
imageSaveAlpha($watermark, true);
imagecopyresampled($image, $watermark, $wmwidth, $wmheight, 0, 0, $width, $height, $x2, $y2);