note 41510 added to function.imagecreatefromjpeg
| From: | MC_Breit at phpws dot org | Date: | Tue, 13 Apr 2004 00:19:28 +0000 |
| Subject: | note 41510 added to function.imagecreatefromjpeg | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-68052@lists.php.net to get a copy of this message | ||
Here is a Simple script is loading a sample Smilie and addin some text into it:
<?php
$pic=ImageCreate(300,100); //(breite, höhe)
$pic = imagecreatefromjpeg("smilie.jpg");
$col1=ImageColorAllocate($pic,0,0,0);
$col2=ImageColorAllocate($pic,255,255,255);
ImageFilledRectangle($pic, 0, 0, 0, 0, $col2);
imagestring ($pic, 5, 55, 5, $_REQUEST['beschr'], $col2);
Header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
Header("Content-type: image/jpeg");
ImageJPEG($pic);
ImageDestroy($pic);
?>
Demo at http://s01.mcb.cc/_codeschnipsel/imagex.php?beschr=Youre%20text
This is usefull in forums, becaus the user can change the text, so no smile is similar...
----
Manual Page -- http://www.php.net/manual/en/function.imagecreatefromjpeg.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+41510
Delete -- http://master.php.net/manage/user-notes.php?action=delete+41510&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+41510&report=yes
Search -- http://master.php.net/manage/user-notes.php