PHP Resim üzerine yazi yazma
Online olarak seçtiginiz resim üzerine istediginiz renk, boyut, font ve koordinatlarda yazi eklemenizi saglayan Php kodudur.
<?php
// Resmin üzerine yazilmasini istediginiz yazi
$yazi = 'MyDesign"
// Resim formati
header('Content-type: image/png');
// Artalan resmi
$im = imagecreatefrompng("resim.png");
// Yazi rengi
$color = imagecolorallocate($im, 255, 200, 115);
// the text to be printed
$text = $yazi;
// Yazi fontu (örnekte palatino linotype kullanilmistir)
$font = 'palab.ttf';
// Yazi büyüklügü
$size = 10;
// Resim olusturuluyor
imagettftext($im, $size, 0, (imagesx($im) - 8 * strlen($text)), 14, $color, $font, $text);
imagepng($im);
imagedestroy($im);
?>
// Resmin üzerine yazilmasini istediginiz yazi
$yazi = 'MyDesign"
// Resim formati
header('Content-type: image/png');
// Artalan resmi
$im = imagecreatefrompng("resim.png");
// Yazi rengi
$color = imagecolorallocate($im, 255, 200, 115);
// the text to be printed
$text = $yazi;
// Yazi fontu (örnekte palatino linotype kullanilmistir)
$font = 'palab.ttf';
// Yazi büyüklügü
$size = 10;
// Resim olusturuluyor
imagettftext($im, $size, 0, (imagesx($im) - 8 * strlen($text)), 14, $color, $font, $text);
imagepng($im);
imagedestroy($im);
?>
Yorumlar
Kodlarda hata var sanırım, düzgün çalışmıyor...
Oluşan hatayla ilgili bir ekran görüntüsü paylaşabilir misiniz?
Yeni yorum veya soru gönder