|
Posted by misiek on 04/12/07 22:05
Is it possible to write a some text to the image and save it to other
name useing GD library and functions ?
If yes can you tell me which function I gotta use maybe same samples ?
I was trying using this script
<?php
srand((double)microtime()*1234567); // Start the random gizmo
$image = imagecreatefromgif("google.gif"); // Get a background
$font =
"/opt/sun-jdk-1.5.0.10/jre/lib/fonts/LucidaTypewriterRegular.ttf"; //
Get a font
$textcolor = imagecolorallocate($image,0,0,0); // Set text color
$text1 = "FR. 4/23"; // Here is our text
imagefttext($image, 50, 0, 20, 50, $textcolor, $font, $text1); // Write
the text with a font
header("Content-type: image/jpeg"); // Its a JPEG
imagegif($image,'',90); // Zap it to the browser
imagedestroy($image); // Memory Freeupage
?>
but it only write a text in header actually not saving into image.
Thank You for help
[Back to original message]
|