|
Posted by monomaniac21 on 05/17/06 00:41
My url is www.aptitudehack.com
Hi i cant get an image to display on another server though it does on
mine. Here is the code for the page. The problem i think is the
imagettftext function particularly the reference to my font file
"Verdana". If i use a different function to write text it does so no
bother but unfortunately i need this function to work. Here is the
error it outputs followed by the code for the page in question:
The image "http://www.aptitudehack.com/imagepage.php" cannot be
displayed, because it contains errors.
<?php
// Define .PNG image
header("Content-type: image/png");
$imgWidth=575;
$imgHeight=175;
// Create image and define colors
$image=imagecreate($imgWidth, $imgHeight);
$colorWhite=imagecolorallocate($image, 255, 255, 255);
$colorRed=imagecolorallocate($image, 255, 0, 0);
//label y axis
imagettftext($image, 7, 0, 22, 110, $colorRed, 'Verdana', 'results');
//this should output the word results
// Output graph and clear image from memory
imagepng($image);
imagedestroy($image);
?>
//the font file is definitely in the same directory
[Back to original message]
|