Ja już nie bardzo mam jakiś pomysł.
W mojej książce nie ma nic o ustawianiu jakości?
Z góry dziękuję za wypowiedzi
<?php function resize($imgName, $size) { if(!($img = imagecreatefromjpeg($imgName))){ return false; } $img_w = imagesx($img); $img_h = imagesy($img); $ratio = $img_w / $img_h; if($ratio > 1){ $new_img_w = $size; $new_img_h = ($size / $ratio); } else{ $new_img_w = ($size * $ratio); $new_img_h = $size; } $tempImg = imagecreatetruecolor($new_img_w, $new_img_h); imagecopyresampled($tempImg, $img, 0, 0, 0, 0, $new_img_w, $new_img_h, $img_w, $img_h); $name = $imgName; imagejpeg($tempImg, $name); $tempImg1 = imagecreatetruecolor($new_img_w, $new_img_h); imagecopyresampled($tempImg1, $img, 0, 0, 0, 0, $new_img_w, $new_img_h, $img_w, $img_h); } resize("$imgName.jpg", 640); ?>