Markus
Новичок
Буквы в GD
Есть такая функция.
function text($text) {
$font_size = 18;
$font = FONT;
$bbox=imagettfbbox ($font_size, 0, $font, $text);
$bbox['width'] = $bbox[0] + $bbox[4];
$bbox['height'] = $bbox[1] - $bbox[5];
$width = $bbox['width']+6;
$height = $bbox['height']+10;
$im = imagecreate($width,$height);
$white = imagecolorallocate($im, 114, 16, 29);
$shadow = imagecolorallocate($im, 67, 9, 17);
$yelow = imagecolorallocate($im, 238, 197, 0);
$x = 2;
$y = $height-5;
imagettftext($im, $font_size, 0, $x+3, $y+3, $shadow, $font, $text);
imagettftext($im, $font_size, 0, $x, $y, $yelow, $font, $text);
imagejpeg($im);
imagedestroy($im);
}
Но качество выводимой картинки оставляет желать лучшего.
Что можно сделать?
Есть такая функция.
function text($text) {
$font_size = 18;
$font = FONT;
$bbox=imagettfbbox ($font_size, 0, $font, $text);
$bbox['width'] = $bbox[0] + $bbox[4];
$bbox['height'] = $bbox[1] - $bbox[5];
$width = $bbox['width']+6;
$height = $bbox['height']+10;
$im = imagecreate($width,$height);
$white = imagecolorallocate($im, 114, 16, 29);
$shadow = imagecolorallocate($im, 67, 9, 17);
$yelow = imagecolorallocate($im, 238, 197, 0);
$x = 2;
$y = $height-5;
imagettftext($im, $font_size, 0, $x+3, $y+3, $shadow, $font, $text);
imagettftext($im, $font_size, 0, $x, $y, $yelow, $font, $text);
imagejpeg($im);
imagedestroy($im);
}
Но качество выводимой картинки оставляет желать лучшего.
Что можно сделать?