Resim çözünürlük hatası.

Arkadaşlar merhaba.. Yönetim panelinden resmi upload ederken çözünürlüğü bozuyor göze çarpacak şekilde bunun sebebi ne olabilir sizce?

Upload Kodu: 

$uploadfile = $uploaddir.$resim;

list($width, $height, $type, $attr) = getimagesize($_FILES['resim']['tmp_name']); 

move_uploaded_file($_FILES['resim']['tmp_name'], $uploadfile);

if($width > 500){

$filename = $uploadfile;      

   $source = imagecreatefromjpeg($filename);  

   $thumbX = "500";    

   $imageX = imagesx($source);

   $imageY = imagesy($source);   

   $thumbY = ($thumbX*$imageY)/$imageX;

   $dest  = imagecreatetruecolor($thumbX, $thumbY);

   imagecopyresampled ($dest, $source, 0, 0, 0, 0, $thumbX, $thumbY, $imageX, $imageY);

   imagejpeg($dest, "../images_up/".$resim);

}

}

2012-12-19 06:05:59

Php

şu satır resim kalitesini ayarlar:

imagejpeg($dest, "../images_up/".$resim);

şöyle ekleme yap:

imagejpeg($dest, "../images_up/".$resim, 95);

Her programcı birgün Php yi tadacaktır
2012-12-21 08:26:34

Php

fotografın bozulmasının sebeb orantısız  boyutlandırıyor olman  herhangi bir   resim  dosyasını upload ederken belli sınırlar icerisinde  tuttugun icin   o sınırlara gore oranlıtı olarak resimi boyutlandırman gerekir  bunu el ile  photoshop tarzi bir programla yapabilecegin gibi  kodlama ile yapabilirsin 

2012-12-22 15:47:02

phpkodlari.com © 2009 Herkes Php öğrenecek
Eglence ve Oyun: Gamikro