PCnet Online forumlarına katılmak için hesap açabilirsiniz.
  • Üye girişi:

PCnet Online forumlarına hoş geldiniz

+ Başlığa Yanıt Yaz
1 sonuçtan 1 - 1 arası sonuçlar
  1. #1

    Exclamation Resim Upload Ederken Resim Üzerine Logo Basma Yardım????

    Bir Türlü Upload Ettiğim Resmin Üzerine Watermark Basıp Kaydedemedim. Yapmış Olduğum Bir Resim Upload Sistemi Var Ve Bu Upload Sisteminde Resmi Upload Ettikten Sonra Resim 3 Şekilde Kayıt Ediyor.

    1. Orjinal Hiç Bozulmamış Hali.
    2.Resize Edilmiş 640*%
    3.Resize Edilmiş Thumb 15*%

    Benim Yapmak İstediğim Upload Ettiğim Resmin Üstüne Watermark Basıp Bu İşlemleri Ondan Sonra Yapmak Ve Upload Ettiğim 3 Farklı Resminde Üzerinde Watermark Olması Baya Bi Watermark Scripti Denedim Ama Olmadı. Yapamadım Yazmış Olduğum Kodlar Aşağıdaki Gibi.

    Bu form.php
    Kod:
    <fieldset><legend><strong>Image Uploader</strong></legend>
    <form action="yukle.php" method="post" enctype="multipart/form-data">
    <input type="hidden" name="MAX_FILE_SIZE" value="2000000" />
    <p><label for="dosya">Select A File For Upload</label><input type="file" name="dosya" id="dosya" />
    <input type="submit" value="Upload File" />
    <br />
    <br />Just JPG Files Allowed.
    <br />Max. File Size 2MB.
    </form>
    </fieldset>
    Buda yukle.php
    Kod:
    <?php
    
            $dosya_ismi=$_FILES['dosya']['name'];
            $gecici_yer=$_FILES['dosya']['tmp_name'];
            $MAX_FILE_SIZE=$_FILES['dosya']['size'];
            $dosya_tipi=$_FILES['dosya']['type'];
            $dosya_uzantisi=substr($dosya_ismi,-4);
            $hata_mesaji=$_FILES['dosya']['error'];
    
        if ($dosya_ismi==""«») 
        {
            echo '<fieldset><legend><strong>Your File Can Not Upload...</strong></legend>';
            echo "Please Check Your File Name.<br />";
            echo '<a href="form.php">Click Here For Upload A Picture</a>';
            echo '</fieldset>';
        }
        elseif ($_FILES['dosya']['error']>0)
        {
            echo '<fieldset><legend><strong>Your File Can Not Upload...</strong></legend>';
            echo $hata_mesaji.' Please Check Your PHP.INI Settings<br />';
            echo '<a href="form.php">Click Here For Upload A Picture</a>';
            echo '</fieldset>';
        }
        elseif($MAX_FILE_SIZE>2000000)
        {
            echo '<fieldset><legend><strong>Your File Can Not Upload...</strong></legend>';
            echo "Please Check Your File Size (Max. File Size = 2 MB.)<br />";
            echo '<a href="form.php">Click Here For Upload A Picture</a>';
            echo '</fieldset>';
        }
            elseif($dosya_tipi=="image/jpeg"«»)
        {
            $id='01';
            $taksim='/';
            $orjinal_dosya='orjinal';
            $normal_dosya='normal';
            $thumb_dosya='thumb';
            $ana_dizin='dosyalar';
            $orjinal_klasor=$ana_dizin.$taksim.$id.$taksim.$orjinal_dosya.$taksim;
            $normal_klasor=$ana_dizin.$taksim.$id.$taksim.$normal_dosya.$taksim;
            $thumb_klasor=$ana_dizin.$taksim.$id.$taksim.$thumb_dosya.$taksim;
            $doyaadi_date=date(HisdmY);
            $gercek_isim=$doyaadi_date.substr($dosya_ismi,-4);
            // Bu Kisim Resmimizden normal boyutta resim olusturmak icin..
            $src = imagecreatefromjpeg($gecici_yer);
            list($width,$height)=getimagesize($gecici_yer);
            $newwidth=640;
            $newheight=($height/$width)*640;
            $tmp=imagecreatetruecolor($newwidth,$newheight);
            imagecopyresampled($tmp,$src,0,0,0,0,$newwidth,$newheight,$width,$height);
            $filename = $normal_klasor. $gercek_isim;
            imagejpeg($tmp,$filename,100);
            // Burasi normal boyutlandirma isleminin bittigi yer.
            // Bu Kisim Resmimizden thumb. resim olusturmak icin..
            $src = imagecreatefromjpeg($gecici_yer);
            list($width,$height)=getimagesize($gecici_yer);
            $newwidth=150;
            $newheight=($height/$width)*150;
            $tmp=imagecreatetruecolor($newwidth,$newheight);
            imagecopyresampled($tmp,$src,0,0,0,0,$newwidth,$newheight,$width,$height);
            $filename = $thumb_klasor. $gercek_isim;
            imagejpeg($tmp,$filename,100);
            imagedestroy($src);
            imagedestroy($tmp);
            // Burasi thumb. yapma isleminin bittigi yer.
            move_uploaded_file($gecici_yer,$orjinal_klasor.$gercek_isim);
            echo '<fieldset><legend><strong>Your Image Uploaded Succesfully...</strong></legend>';
            echo '<fieldset><legend><strong>File Link: '.$orjinal_klasor. $gercek_isim.'</strong></legend>';
            echo '<img src="'.$orjinal_klasor.$gercek_isim.'"/><br /></fieldset>';
            echo '<fieldset><legend><strong>File Link: '.$normal_klasor. $gercek_isim.'</strong></legend>';
            echo '<img src="'.$normal_klasor.$gercek_isim.'"/><br /></fieldset>';
            echo '<fieldset><legend><strong>File Link: '.$thumb_klasor. $gercek_isim.'</strong></legend>';
            echo '<img src="'.$thumb_klasor.$gercek_isim.'"/><br /></fieldset>';
            echo '<a href="form.php">Click Here For Upload A New Picture</a>';
            echo '</fieldset>';
        }
        elseif($dosya_tipi=="image/pjpeg"«»)
        {
            $id='01';
            $taksim='/';
            $orjinal_dosya='orjinal';
            $normal_dosya='normal';
            $thumb_dosya='thumb';
            $ana_dizin='dosyalar';
            $orjinal_klasor=$ana_dizin.$taksim.$id.$taksim.$orjinal_dosya.$taksim;
            $normal_klasor=$ana_dizin.$taksim.$id.$taksim.$normal_dosya.$taksim;
            $thumb_klasor=$ana_dizin.$taksim.$id.$taksim.$thumb_dosya.$taksim;
            $doyaadi_date=date(HisdmY);
            $gercek_isim=$doyaadi_date.substr($dosya_ismi,-4);
            // Bu Kisim Resmimizden normal boyutta resim olusturmak icin..
            $src = imagecreatefromjpeg($gecici_yer);
            list($width,$height)=getimagesize($gecici_yer);
            $newwidth=640;
            $newheight=($height/$width)*640;
            $tmp=imagecreatetruecolor($newwidth,$newheight);
            imagecopyresampled($tmp,$src,0,0,0,0,$newwidth,$newheight,$width,$height);
            $filename = $normal_klasor. $gercek_isim;
            imagejpeg($tmp,$filename,100);
            // Burasi normal boyutlandirma isleminin bittigi yer.
            // Bu Kisim Resmimizden thumb. resim olusturmak icin..
            $src = imagecreatefromjpeg($gecici_yer);
            list($width,$height)=getimagesize($gecici_yer);
            $newwidth=150;
            $newheight=($height/$width)*150;
            $tmp=imagecreatetruecolor($newwidth,$newheight);
            imagecopyresampled($tmp,$src,0,0,0,0,$newwidth,$newheight,$width,$height);
            $filename = $thumb_klasor. $gercek_isim;
            imagejpeg($tmp,$filename,100);
            imagedestroy($src);
            imagedestroy($tmp);
            // Burasi thumb. yapma isleminin bittigi yer.
            move_uploaded_file($gecici_yer,$orjinal_klasor.$gercek_isim);
            echo '<fieldset><legend><strong>Your Image Uploaded Succesfully...</strong></legend>';
            echo '<fieldset><legend><strong>File Link: '.$orjinal_klasor. $gercek_isim.'</strong></legend>';
            echo '<img src="'.$orjinal_klasor.$gercek_isim.'"/><br /></fieldset>';
            echo '<fieldset><legend><strong>File Link: '.$normal_klasor. $gercek_isim.'</strong></legend>';
            echo '<img src="'.$normal_klasor.$gercek_isim.'"/><br /></fieldset>';
            echo '<fieldset><legend><strong>File Link: '.$thumb_klasor. $gercek_isim.'</strong></legend>';
            echo '<img src="'.$thumb_klasor.$gercek_isim.'"/><br /></fieldset>';
            echo '<a href="form.php">Click Here For Upload A New Picture</a>';
            echo '</fieldset>';
        }
        else
        {
            echo '<fieldset><legend><strong>Your File Can Not Upload...</strong></legend>';
            echo "<p>Please Check Your File Name.<br />";
            echo "Please Check Your File Type<br />";
            echo "Just JPEG Files Allowed<br />";
            echo "Please Check Your File Size (Max. File Size = 2 MB.)<br />";
            echo ' Please Check Your PHP.INI Settings Error = ('.$hata_mesaji.')<br />';
            echo '<a href="form.php">Click Here For Upload A Picture</a></p></p>';
            echo '</fieldset>';    
        }
    ?>
    Upload Edilen Resimlerin Üzerine Watermark Basmam İçin Ne Yapmam Gerekiyor Acaba Yardımcı Olursanız Sevinirim.
    Şimdiden Teşekkür Ederim.


 

Benzer Başlıklar

  1. wordde resim üzerine yazı
    metin_4545 tarafından Yazılım forumunda
    Yanıt: 1
    Son Mesaj: 18.03.2008, 17:33
  2. Resim üzerine yazı (logo) ekleme.
    ss tarafından Web ve Grafik Tasarımı forumunda
    Yanıt: 3
    Son Mesaj: 15.02.2008, 13:55
  3. canon pixma mp160 resim basma
    dilemma86 tarafından Donanım forumunda
    Yanıt: 3
    Son Mesaj: 29.10.2007, 22:21
  4. resim üzerine gif yapıştırmak
    oguzyy tarafından Web ve Grafik Tasarımı forumunda
    Yanıt: 4
    Son Mesaj: 11.04.2006, 12:43
  5. CD Üzerine Resim Çizme
    contact tarafından Donanım forumunda
    Yanıt: 7
    Son Mesaj: 15.05.2004, 20:16