Code:
I want to create a watermak of the exists image "rotheps.GIF" (the font exists in that path).
Code: Select all
<?php
$image = "rotheps.GIF";
echo "<b>Immagine passata: </b><br><br><img src=\"".$image."\" /><br>";
$im = imagecreatefromgif($image);
$white = imagecolorallocate($im, 255, 255, 255);
$grey = imagecolorallocate($im, 128, 128, 128);
$black = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 399, 29, $white);
$text = 'Testing...';
$font = "/WINDOWS/Fonts/TIMES.TTF";
$result = imagettftext($im, 20, 0, 11, 21, $grey, $font, $text);
echo "<br><br><b>Immagine watermark: </b><br><br><img src=\"".$result."\" /><br>";
?>I've tried to print $im, and it said "Resource id #3".
Help me pliiiz.
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: