I wanted to print my sitename to all images that published nodes on my website so I was looking for a module for that purpose and came across this module. I enabled the module. However I didn't configure it properly.

Could you help me how can I print my sitename to all images of nodes ? I couldn't get it to work :(

Comments

dman’s picture

This is not available in D7
Your best idea is to make your own text or logo as a transparent png, and then use overlay/watermark effect to place it

dman’s picture

This is not available in D7
Your best idea is to make your own text or logo as a transparent png, and then use overlay/watermark effect to place it

logoservisdestek’s picture

it worked thanks

denjell’s picture

Version: 7.x-0.0 » 7.x-1.x-dev
Category: support » feature

No, dman, I disagree. Your best bet is to use a custom action (and stick with the dev version). I got the basis of this from http://drupal.org/node/1090312

$fontsize = 14;
// just upload a ttf (this one has been downloaded from google fonts)
$fontfile = 'sites/default/files/Vollkorn-Bold.ttf';

// this is the text to place
$text = "logo.servisdestek.com";

$img2 = imagecreatetruecolor($width, $height);
imagecopyresampled($img2, $image->resource, 0, 0, 0, 0, $width, $height, $width, $height);

$box = imagettfbbox($fontsize, 0, $fontfile, $text);
$textwidth = abs($box[4] - $box[0]);
$textheight = abs($box[5] - $box[1]);
$xcord = 7; //($width/2)-($textwidth/2)-2;
$ycord = ($height)-12;

//the first imagettftext is a light grey (E3E3E3) at 50% alpha (0x50).
imagettftext ($img2, $fontsize, 0, $xcord, $ycord,0x503E3E3E, $fontfile, $text);

//the second imagettftext is a white (FFFFFF) at 50% alpha (0x50).
imagettftext ($img2, $fontsize, 0, $xcord+2, $ycord+2, 0x50FFFFFF, $fontfile, $text);

imagecopyresampled($image->resource, $img2, 0, 0, 0, 0, $width, $height, $width, $height);
imagedestroy($img2);

return $image;
fietserwin’s picture

Status: Active » Closed (works as designed)

Fixed text that never changes can perfectly be done with the overlay/watermark effect. Being an image it will give you even more options than an annotate with text effect (e.g. adding your logo or favicon to your site name).

So this feature request is a "works as designed". If you are looking for a (dynamic) text effect: it is coming soon, see this issue: #1090312: Add text effect to D7.