note 100507 deleted from function.imagecreatefrompng by danbrown

From: Date: Wed, 20 Oct 2010 13:42:12 +0000
Subject: note 100507 deleted from function.imagecreatefrompng by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-173312@lists.php.net to get a copy of this message
Note Submitter: onsergey at mail dot ru ---- I make custom counter. In Php 4.x this is not problem. In 5.2.x and 5.3.x it is'nt work! //white font is true in PHP 4.x //and dont true in PHP 5.x (black!) //image png - http://www.sovencon.ru/count.png //test.php - http://www.sovencon.ru/test.php //sample - http://www.sovencon.ru/counter.php <? $im=ImageCreateFromPng("count.png"); $str1=substr("000000000",1,9-strlen("".$count))."$count"; $color=imagecolorallocate($im,255,255,255); imagestring($im, 5, 19, 52,$str1, $color); imagestring($im, 5, 18, 51,$str1, $color); Header("Content-type: image/png"); ImagePng($im); ImageDestroy($im); ?> P.S. And in GIF - is bad too, in jpeg - is very good (white is white, but PNG is more productive in bytes) P.S.S. I am waiting right GD for Free BSD and Ubuntu =)

« previous php.notes (#173312) next »