At present the watermark is shown in gray and it makes it unreadable.What changes should be made to below code to get watermark as shown in below links , and can this feature be added in next tidypics release?
// transparent gray
imagealphablending($image, true);
$textcolor = imagecolorallocatealpha($image, 50, 50, 50, 60);
// font and location
$font = $CONFIG->pluginspath . "tidypics/fonts/LiberationSerif-Regular.ttf";
$bbox = imagettfbbox(20, 0, $font, $watermark_text);
$text_width = $bbox[2] - $bbox[0];
$text_height = $bbox[1] - $bbox[7];
$image_width = imagesx($image);
$image_height = imagesy($image);
$left = $image_width / 2 - $text_width / 2;
$top = $image_height - 20;
// write the text on the image
imagettftext($image, 20, 0, $left, $top, $textcolor, $font, $watermark_text);
}
function tp_imagick_watermark($filename) {
$watermark_text = get_plugin_setting('watermark_text', 'tidypics');
if (!$watermark_text)
return;
http://img.india-forums.com/images/600x0/154189-katrina-kaif.jpg
or
http://icanhascheezburger.files.wordpress.com/2011/11/funny-pictures-my-official-monday-face.jpg
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.