resim üzerine yazı olayında editleme için yardım lütfen arkadaşlar aşagıda mevcut resim üzerine yazı yazacak kodlarım var bununla yazdırıyorum eklenen resimlerin üzerine yazıyı ancak yapmak istediğim küçük resimlerde resmin üst tarafına ortalı şekilde 10px ile yazı yazmak
büyük resimlerde resmin sağ alt köşesine 20px mavi renkte yazı ve pembe renkte gölgeli olacak şekilde yazı yazdırmak istiyorum.
cok denedim ama bozdum yapamadım, ilgilenirseniz memnun olurum PHP Kodu:
<?php
ob_start(); session_start(); include "data.php"; $array = array("ı" ,"ü" ,"ç" ,"ö" ,"İ" ,"Ü" ,"Ğ" ,"ğ" ,"Ö" ,"Ş" ," "); $hedefim = "upload/galeri".$dosya; ############################################################################ if ( empty($_POST[radiobutton]) ) { echo "<script> alert('lütfen Katagorinizi Seçiniz'); history.back(1); </script>"; exit(); } ##################################################### if (empty($_POST["sayac"])){ $sayac = 1 ; } else { $sayac = $_POST["sayac"]; } ############# Dosya Uzantisi Kontrol ediliyor ################## $var = 1;
while ( $var <= $sayac ) { $kaynak = $_FILES["dosya_$var"]["tmp_name"]; $dosya = str_replace(" ", "_", $_FILES["dosya_$var"][name]); $dosya = str_replace($array, '-',$dosya); if (file_exists($hedefim)) { $hmz = substr(md5(uniqid(rand())),0,8); $hedefim = "upload/galeri/$hmz-".$dosya; $dosya = "$hmz-".$dosya; } $hedefim = strtolower($hedefim); move_uploaded_file($kaynak,$hedefim); $xxx = getimagesize($hedefim); $buyuk_en=$xxx[0] ; $buyuk_boy= $xxx[1] -5 ; $resim = substr($_FILES["dosya_$var"][type], strpos($_FILES["dosya_$var"][type],'/')+1); switch($resim) { case 'jpeg': case 'pjpeg': case 'tiff'; $resim = imagecreatefromjpeg($hedefim); break; case 'png': case 'x-png': $resim = imagecreatefrompng($hedefim); break; case 'gif': $resim = imagecreatefromgif($hedefim); break; default: return FALSE; break; } $beyaz = imagecolorallocate($resim, 255,255,255); $siyah = imagecolorallocate($resim, 0, 0, 0); imagettftext($resim, 30, 0, 5, $buyuk_boy, $beyaz, "2.ttf", "$_POST[yazi]");
imagejpeg($resim,$hedefim,100);
#################################################
$h = "150"; $w = "150"; $eni = explode(".", $hedefim); $yeni = "$eni[0]-thumb.$eni[1]";
$tbumof = $yeni; $thumbresim = explode("/", $yeni); $yeni = "upload/ufak/$thumbresim[2]";
$im = imagecreatetruecolor ($w, $h);
$xxx = getimagesize($hedefim); imagecopyresampled($im, $resim, 0, 0, 0, 0, $w, $h, $xxx[0], $xxx[1]);
imagejpeg($im, $yeni, 100); imagedestroy($im); imagedestroy($resim); ####################################################### $ekle = mysql_query("insert into resimler ( `buyuk` , `kucuk` ,`kat` ) values ( '$hedefim' , '$yeni','$_POST[radiobutton]')");
$var++; }
?>
__________________
Ölenin adresi bellidir, toprağına dokunursun, konuşur sesini duyurursun.
Ama giden nerededir, neyapar bilemezsin, onu iki dünyada da bulamazsın...
|