25-03-2007, 15:17
|
|
|
חבר מתאריך: 29.10.04
הודעות: 350
|
|
אני לא מצליח להשתמש בפונקציה imagettftext
עשיתי בידיוק כמו בדוגמה שיש שם: PHP.Net - imagettftext
קוד PHP:
<?php // Set the content-type header("Content-type: image/png"); // Create the image $im = imagecreatetruecolor(400, 30); // Create some colors $white = imagecolorallocate($im, 255, 255, 255); $grey = imagecolorallocate($im, 128, 128, 128); $black = imagecolorallocate($im, 0, 0, 0); imagefilledrectangle($im, 0, 0, 399, 29, $white); // The text to draw $text = 'Testing...'; // Replace path by your own font path $font = 'arial.ttf'; // Add some shadow to the text imagettftext($im, 20, 0, 11, 21, $grey, $font, $text); // Add the text imagettftext($im, 20, 0, 10, 20, $black, $font, $text); // Using imagepng() results in clearer text compared with imagejpeg() imagepng($im); imagedestroy($im); ?>
העלתי את הפונט arial ובכל זאת אני לא רואה כלום!
מישהו יודע מה אני עושה לא בסדר?
בתודה רבה, Mr.K!!
_____________________________________
ציוד:
Nikon D70s, Nikkor 18-135mm
Nikon D7100, Nikkor 17-55mm F/2.8 G DX IF-ED
|