Reputation: 157
<?php
header ('Content-Type: image/png');
$im = @imagecreatetruecolor(120, 20)
or die('Cannot Initialize new GD image stream');
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color);
imagepng($im);
imagedestroy($im);
?>
That should work, but is just showing a blank page. I have php-gd installed. Help?
Upvotes: 0
Views: 66
Reputation: 6548
Try some debugging steps:
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 'On');
header()
@
from @imagecreatetruecolor()
Upvotes: 4