Welcome to WebmasterWorld Guest from 220.127.116.11 , register , free tools , login , search , subscribe , help , library , announcements , recent posts , open posts Pubcon Platinum Sponsor 2014
resize images w/o sacrificing quality basic php image resize can really make your images look bad... irock msg:1303372 8:05 pm on Nov 5, 2002 (gmt 0) I'm trying to add a JPEG image resize for my catalog. However, when I tried to use the following code. My images would look very wash out. I was wondering if there's a way to resample the size of the image w/o scarificing the quality of the original image. I'm using PHP/mySQL.
$orig_image = imagecreatefromjpeg("path/to/imagefile.jpg"); $sm_image = Imagecreate(50,50); Imagecopyresized($sm_image,$orig_image,0,0,0,0,50,50,imagesx($orig_image),imagesy($orig_image)); Header("Content-type: image/jpeg"); imageJPEG($sm_image); imagedestroy($sm_image); imageDestroy($orig_image); ?>
andreasfriedrich msg:1303373 8:24 pm on Nov 5, 2002 (gmt 0)
Use imagecopyresampled [ php.net] instead of imagecopyresized. irock msg:1303374 9:09 pm on Nov 5, 2002 (gmt 0)
Do you konw how to get GD 2.0 support? Mine is only GD 1.62.