Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Faço resize com o seguinte codigo:
list($width, $height) = getimagesize($uploadfile);
if($width>402){
$newwidth = 402;
$newheight = $height * ((402 * 100)/$width )/100;
// Load
$thumb = imagecreatetruecolor($newwidth, $newheight);
$source = Img::imagecreatefrom($size[2],$uploadfile);
// Resize
imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
Img::createimage($size[2],$thumb,$uploadfile);
}
So que a imagem está ficando feia, como resolver?
Alguem sabe?
Valew..
Carregando comentários...