RE: [PHP] Poor results with GD

From: Date: Tue, 16 Apr 2002 08:18:50 +0000
Subject: RE: [PHP] Poor results with GD
Groups: php.general 
Request: Send a blank email to php-general+get-93147@lists.php.net to get a copy of this message
Excellent advice, thanks. I was using GD 1.6.2 :( so will sort this and try again. Mick -----Original Message----- From: Richard Archer [mailto:phpgeneral@juggernaut.com.au] Sent: 15 April 2002 22:58 To: php-general@lists.php.net Subject: Re: [PHP] Poor results with GD At 5:32 PM +0200 15/4/02, Sear, Mick wrote: >Not sure if anyone else uses GD much, but I've been experimenting with it >and PHP recently and I've found I get large file sizes and very 'aliased' >graphics. gd is the correct tool for your job. But there are some caveats. You will need to be using gd-2.0 or better to get satisfactory results for this sort of work. gd-2.0.1 supports: bicubic interpolation for scaling images 24-bit (true colour) images Make sure your images aren't being converted to 8-bit at any stage of the scaling/cropping process. Use ImageCreateTrueColor to create images. Oh, and there's a bug in either php-4.1.2 or gd-2.0.1 where scaling and cropping with one operation using imagecopyresampled fails. I use a work-around of cropping with imagecopyresized and then scaling with imagecopyresampled. The large file sizes could be improved by reducing the quality of the JPEG compression. Also, once the images have been scaled smoothly, there will be fewer sharp edges allowing JPEG compression to be more efficient. ...R.

« previous php.general (#93147) next »