|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-08-26 06:35 UTC] mathieu@php.net
[2001-08-27 18:09 UTC] wez@php.net
[2001-10-02 19:11 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 14:00:01 2025 UTC |
<?php header ("Content-type: image/png"); $text=implode($argv," "); $image=imageCreateFromPNG("basic.png"); $background_color = ImageColorAllocate ($im, 100, 100, 255); $text_color=imageColorAllocate($image,255,100,100); $textX=(imageSX($image)-imageFontWidth(4)*strlen($text))/2; imageString($image,5,$textX,10,$text,$text_color); imagePNG($image); imageDestroy($image); ?> This is only a small modification of the example given in the manual, but the $text_color is always white. This works for JPEG, but the quality suffers, and my build of PHP doesn't support GIF's.