Sublime directory Surf the web anonymous Pagerank Monitor


imagettftext question

stickdragon
Thu 27 December 2007, 02:12 am GMT +0200
been playing around with the image functions and ran into a small wall..

while using imagecreatetruecolor i can use imagettftext fine with no errors, but if i add imagettftext i get

Quote
The image “test.php” cannot be displayed, because it contains errors.

what do you need to do to use imagettftext from the imagecreatefrompng?

Code:
<?php
header
('Content-Type: image/png');
$im = @imagecreatefrompng("test.png");

$black imagecolorallocate($im255255255);
imageline($im406211762$black);

imagettftext($im804060$black$font'test..');
imagepng($im);
?>

olaf
Thu 27 December 2007, 09:02 am GMT +0200

from the manual
Quote
An image resource, returned by one of the image creation functions, such as imagecreatetruecolor().


looks like a kind of requirement, GD is very limited, use Imagemagick instead

Archive for SMF v1.00 by N.P. Valid XHTML 1.0 Transitional