note 58947 added to function.imagecreatetruecolor
| From: | andrewfirst at gmail dot com | Date: | Mon, 21 Nov 2005 18:05:26 +0000 |
| Subject: | note 58947 added to function.imagecreatetruecolor | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-98902@lists.php.net to get a copy of this message | ||
Hello,
I am trying to render text overtop of an existing jpg image.
I have found that the only way to get the text to be anti-alised is to use "imagecreate".
When I have tried it with "imagecreatefromjpeg" or "imagetruecolor" the text is
not anti-alised. The only problem is when i use "imagecreate" allthough the text looks
great, it seems to lower the color depth of the image? Or it seems to set transparency... Either way
the image now looks like garbage...
Is there a way to use either "imagecreatefromjpeg" or "imagetruecolor" yet still
keep the text antialised?
Or can I use "imagecreate" and then merge a jpg overtop of it yet still keep the image
color depth set to full?]
If anyone has any ideas let me know.
Thanks, Andrew
$myimage = imagecreate(848,138);
imagettftext($myimage, 0, 0, 0, 0, $color, "ARIAL", "some text here");
imagejpeg($myimage, "my_image.jpg", 100);
----
Manual Page -- http://www.php.net/manual/en/function.imagecreatetruecolor.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+58947
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58947&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58947&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58947&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58947&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58947&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58947&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58947&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+58947&report=yes
Search -- http://master.php.net/manage/user-notes.php