I am resizing jpeg images on the fly using GD 1.X and the images are being resized from 640-480 to 448 by whatever and the images are resizing but I am losing alot of quality.
My code sample is below. I was going to use imagemagick but my hosting provider does not have it installed, any suggestions.
$src_img = imagecreatefromjpeg("test.jpg");
$picsize = 100;
$new_w = imagesx($src_img);
$new_h = imagesy($src_img);
$aspect_ratio = $new_h / $new_w;
$new_w = $picsize;
$new_h = abs($new_w * $aspect_ratio);
$dst_img = imagecreate($new_w,$new_h);
imagecopyresized($dst_img,$src_img,0,0,0,0,$new_w,$new_h,imagesx($src_img),imagesy($src_img));