|
Posted by Gleep on 04/12/07 23:11
On Thu, 12 Apr 2007 17:05:17 -0500, misiek <michal_augustyniak@gazeta.pl> wrote:
>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
i wrote this app last year
http://www.secretsparklegram.com/
it's for cell phones, but the idea is the same adding text over graphics and having php create
images. if this is similar to what you want, i can post code that adds text over images. You'll
have to adapt your to your needs most likely.
[Back to original message]
|