Hi Guys,
I have this small problem with the size of resized image, I have the image wich is 1MB with 1200x1600px and when I resize it to 60x80 the size is 16KB and it's BMP. What I want is to be JPG and then should be about 2KB.
I dont see the mistake in my code, please advice.
$photo = "myFile.jpg";
list($ow,$oh) = getimagesize($photo);
$nw = 60;
$nh = $oh * $nw / $ow;
$small = imagecreatetruecolor($nw,$nh);
$big = imagecreatefromjpeg($photo);
imagecopyresized($small,$big,0,0,0,0,$nw,$nh,$ow,$oh);
header("Content-type: image/jpeg");
imagejpeg($small);