Webmaster Forumu

Geri git   Webmaster Forumu > Webmaster Kaynak Eğitim Tanıtım Hizmet > İnternet Programlama ve Kodlama > PHP

PHP PHP & PHP Hızlandırıcılar

Cevapla
 
LinkBack Seçenekler Stil
  #1 (permalink)   iTrader 
Alt 2006-08-17, 00:16
Member
 
Üyelik tarihi: Jan 2005
Nerden: Suisse
Mesajlar: 329
Tecrübe Puanı: 3
iTrader: %100/3
worshiphim is an unknown quantity at this point
Standart resimin içine yazı yazmak

merhaba
kullandığım scriptte değişiklik yapmak istiyorum resim gösterilirken içine yazı yazmak istiyorum...
<img src="view2.php?picture=<?=$line[picture];?>&i=3" border="0">
resim yukarıdaki url de görüntüleniyor
Aşağıdaki örneği üstteki url ye nasıl uyarlayabilirim
<?php
// Set the content-type
header("Content-type: image/png");

// Create the image
$im = imagecreatetruecolor(400, 30);

// 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 = 'merhaba!';
// Replace path by your own font path
$font = 'arial.ttf';

// Add some shadow to the text
imagettftext($im, 20, 0, 11, 21, $grey, $font, $text);

// Add the text
imagettftext($im, 20, 0, 10, 20, $black, $font, $text);

// Using imagepng() results in clearer text compared with imagejpeg()
imagepng($im);
imagedestroy($im);
?>
sorunu halletmeme yardım edecek kişiye 1 .info domain benden
ufak bir armagan..
teşekkürler
Alıntı ile Cevapla

  #2 (permalink)   iTrader 
Alt 2006-08-17, 00:37
Angelo - ait Kullanıcı Resmi (Avatar)
Moderator
 
Üyelik tarihi: Dec 2004
Nerden: Phoenix,AZ
Mesajlar: 4.337
Tecrübe Puanı: 8
iTrader: %100/4
Angelo is just really niceAngelo is just really niceAngelo is just really niceAngelo is just really nice
Standart

$line[picture] diye cagirilan ne, resimin bulundugu dizinin yolu ve dosya ismi mi? Eger oyleyse

$im = imagecreatetruecolor(400, 30);

Yazan yerde,

$im = imagecreatefromjpeg($line[picture]);

diyerek kaynak resimi elindeki resimden olusturtabilirsin. URL'nin bu kadarindan anlamak zor.
__________________
peace love union respect
Alıntı ile Cevapla

  #3 (permalink)   iTrader 
Alt 2006-08-17, 02:05
Member
 
Üyelik tarihi: Jan 2005
Nerden: Suisse
Mesajlar: 329
Tecrübe Puanı: 3
iTrader: %100/3
worshiphim is an unknown quantity at this point
Standart

merhaba söylediginizi uyguladim ama hata verdi;

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /home/pro/public_html/mevcut.php on line 171
Alıntı ile Cevapla

  #4 (permalink)   iTrader 
Alt 2006-08-17, 08:37
Angelo - ait Kullanıcı Resmi (Avatar)
Moderator
 
Üyelik tarihi: Dec 2004
Nerden: Phoenix,AZ
Mesajlar: 4.337
Tecrübe Puanı: 8
iTrader: %100/4
Angelo is just really niceAngelo is just really niceAngelo is just really niceAngelo is just really nice
Standart

view2.php yi gormem lazim.
__________________
peace love union respect
Alıntı ile Cevapla

  #5 (permalink)   iTrader 
Alt 2006-08-17, 12:32
Member
 
Üyelik tarihi: Jan 2005
Nerden: Suisse
Mesajlar: 329
Tecrübe Puanı: 3
iTrader: %100/3
worshiphim is an unknown quantity at this point
Standart

merhaba kod asagidadir (viev2.php)
<?
$resim = "/pictures/".$picture;
include "duzenle.php";


$thumb=new thumbnail("$resim");
$size = getimagesize("$resim");
$width= $size[0];
$height= $size[1];


if($i == "1"){
$max_width= "120";
if ($width>$max_width){
$thumb->size_width(120);
}else{
$thumb->size_width($width);
$thumb->size_height($height);
}
}
if($i == "2"){
$max_width = "400";
if ($width>$max_width){
$thumb->size_width(400);
}else{
$thumb->size_width($width);
$thumb->size_height($height);
}
}
if($i == "3"){
$max_width = "150";
if ($width>$max_width){
$thumb->size_width(150);
}else{
$thumb->size_width($width);
$thumb->size_height($height);
}
}
if($i == ""){

$thumb->size_width($width);
$thumb->size_height($height);

}



$thumb->jpeg_quality(70);
$thumb->show();
?>
Alıntı ile Cevapla

  #6 (permalink)   iTrader 
Alt 2006-08-17, 16:57
Angelo - ait Kullanıcı Resmi (Avatar)
Moderator
 
Üyelik tarihi: Dec 2004
Nerden: Phoenix,AZ
Mesajlar: 4.337
Tecrübe Puanı: 8
iTrader: %100/4
Angelo is just really niceAngelo is just really niceAngelo is just really niceAngelo is just really nice
Standart

Fonksiyonlarla baska dosyalara bagliymis gerci ama yine de birseyler yapmaya calistim, bilmeden ancak bu kadar. Calismassa kizma

Araya girdigim yere buyuk harflerle aciklama yazdim. Baska bir isimle kaydedip test et.

PHP- Kodu:
<?
$resim 
"/pictures/".$picture;
include 
"duzenle.php";

// RESIM DEGISKENI OLARAK ALINAN RESIM DOSYASINA
// YAZI YAZDIRACAGIZ 
//
// EK BASLA


$im imagecreatefromjpeg($resim);
// RESIM JPEG DEGILSE 
// imagecreatefromgif,  imagecreatefrompng gibi fonksiyonlar kullanilmali

// Create some colors
$white imagecolorallocate($im255255255);
$grey imagecolorallocate($im128128128);
$black imagecolorallocate($im000);
imagefilledrectangle($im0039929$white);

// The text to draw
$text 'merhaba!';
// Replace path by your own font path
$font 'arial.ttf';

// Add some shadow to the text
imagettftext($im2001121$grey$font$text);

// Add the text
imagettftext($im2001020$black$font$text);


imagejpeg($im,$resim,70);



// EK BITIR

$thumb=new thumbnail("$resim");
$size getimagesize("$resim");
$width$size[0];
$height$size[1];


if(
$i == "1"){
$max_width"120";
if (
$width>$max_width){
$thumb->size_width(120);
}else{
$thumb->size_width($width);
$thumb->size_height($height);
}
}
if(
$i == "2"){
$max_width "400";
if (
$width>$max_width){
$thumb->size_width(400);
}else{
$thumb->size_width($width);
$thumb->size_height($height);
}
}
if(
$i == "3"){
$max_width "150";
if (
$width>$max_width){
$thumb->size_width(150);
}else{
$thumb->size_width($width);
$thumb->size_height($height);
}
}
if(
$i == ""){

$thumb->size_width($width);
$thumb->size_height($height);

}



$thumb->jpeg_quality(70);
$thumb->show();
?>
__________________
peace love union respect
Alıntı ile Cevapla

  #7 (permalink)   iTrader 
Alt 2006-08-18, 03:11
Member
 
Üyelik tarihi: Jan 2005
Nerden: Suisse
Mesajlar: 329
Tecrübe Puanı: 3
iTrader: %100/3
worshiphim is an unknown quantity at this point
Standart

gerçekten çok teşekkürler hemen deniyorum domain için pm atınız
Alıntı ile Cevapla

Cevapla

Seçenekler
Stil


Benzer Konular
Konu Konuyu Başlatan Forum Cevaplar Son Mesaj
Kaynak Kodu ve Resimin Üzerine gelince Kaydetme butonu BEBEX HTML XML XHTML DHTML CSS 7 2006-06-17 21:50
video uzerine yazı yazmak ugurcan Müzik Sinema TV Kitap 9 2006-04-13 19:10
Resimlere Yazı yazmak eflatun Webmaster Genel Konular 1 2006-01-25 13:41
aviye yazı yazmak yakese Webmaster Genel Konular 3 2006-01-03 20:53
Updated, kırmızı yazı gitti; siyah yazı gelmiş.. dedektif Internetten Para 9 2005-05-28 19:07


Bütün Zaman Ayarları WEZ +2 olarak düzenlenmiştir. Şu Anki Saat: 22:53 .


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0

Firefox