Results 1 to 3 of 3
Thread: PHP convert text to image, .
Hybrid View
-
5th August 2010 22:25 #1
PHP convert text to image, .
.
user friendly , php.
imageTTFText(). :
, verdana, 10 ( , - ). verdana.ttf Fonts Windows XP.
. , -, - -, / - - .
E :
.
, . , -. , resize, . , - , .
http://nuclear868.net/texttoimage/im...e%20lazy%20dog - , . ( text= , ).
?
, png , ( IMG , ).. HWBG !
-
6th August 2010 00:16 #2Registered User
Join Date: Aug:2006
Location: Sofia
Posts: 37
100% , , imagecreate, imagecreatetruecolor. :
- .PHP Code:<?php
header('Content-type: image/png');
$im = imagecreatetruecolor(400, 30);
$white = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 399, 29, $white);
$text = 'Testing...';
$font = './verdana.ttf';
imagettftext($im, 10, 0, 10, 20, $black, $font, $text);
imagepng($im);
imagedestroy($im);
-
6th August 2010 17:56 #3




Reply With Quote
Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in