$fontColor = ImageColorAllocate($img, 255, 0, 0); $text = 'Testing...'; ImageTTFText($img, 10, -9, 20, 20, $fontColor, $text);
Ktoś wie jak to powinno wygladac zeby na obrazku byl zwrocony tekst ze zmiennej?
$fontColor = ImageColorAllocate($img, 255, 0, 0); $text = 'Testing...'; ImageTTFText($img, 10, -9, 20, 20, $fontColor, $text);
<?php // Set the content-type // Create the image $im = imagecreatetruecolor(500, 300); // 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 the text imagettftext($im, 100, 0, 10, 20, $black, $font, $text); // Using imagepng() results in clearer text compared with imagejpeg() imagepng($im,'zd1.png'); imagedestroy($im); ?>
../public_html/x/y/inc/incother
../public_html/x/y/fonts
JAS FASOLA