Новичок
Профиль
Группа: Участник
Сообщений: 19
Регистрация: 24.3.2009
Репутация: нет Всего: нет
|
Доброго времени суток. Нашёл скриптик вот. Не могу осуществить... У кого получилось? Вот ещё по идеи скриптик, который осуществляет тоже самое: | Код | $img = ImageCreateTrueColor (902,91); //$black = imagecolorallocate($img,0,0,0); //$white = imagecolorallocate($img,255,255,255); $texture = imagecreatefrompng("../im/tile.png"); imagettftexttexture( $img, $texture, 70,0, 5,80, "../fonts/arial.ttf", "AaBbCcDdEeFfGgHhIiJjKk");
function imagettftexttexture(&$im,&$textureim,$size,$angle,$x,$y,$fontfile,$text) { $width = imagesx($im); // Get the width of the image $height = imagesy($im); // Get the height of the image $buffer = imagecreate($width,$height); // Create the buffer image imagesettile($buffer,$textureim); $pink = imagecolorclosest($im,255,0,255); // Create magic pink, a color commonly used for masks $trans = imagecolortransparent($im,$pink); // Make magic pink the transparent color imagettftext($im,$size,$angle,$x,$y,-$pink,$fontfile,$text); // Draw text over magic pink without aliasing imagecopy($buffer,$im,0,0,0,0,$width,$height); // Copy the main image onto the buffer imagecopy($im,$buffer,0,0,0,0,$width,$height); // Copy the buffer back onto the main image imagedestroy($buffer); // Destroy the buffer }
Header ("Content-Type: Image/PNG"); imagepng($img); imagedestroy($img); imagedestroy($texture);
|
Это сообщение отредактировал(а) PoMKA - 1.4.2009, 16:43
|