Re: GD2 gif resizing problem

From: Date: Thu, 16 Mar 2006 12:26:42 +0000
Subject: Re: GD2 gif resizing problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-232021@lists.php.net to get a copy of this message
Al wrote:
I'm trying to resize GIF images and up with very large files For example: Original width = 720 New width = 980 Original height = 1008 New height = 1274 Original filesize = 80kb After resizing = 235kb Based on the area increase; I'd expect the file size to about double, not be 4x as large. $src_img = imagecreatefromgif($filename); $dest_img = imagecreatetruecolor($new_width, $new_height);
does this function give a better result in terms of filesize?: http://php.net/manual/en/function.imagecopyresized.php
imagecopyresampled($dest_img, $src_img, 0, 0, 0, 0, $new_width, $new_height, $org_width, $org_height); imagegif($dest_img, $filename); I tried using imagetruecolortopalette() and it helped a little; but screwed up the image quality. Can anyone explain or have a solution? Thanks....
    


« previous php.general (#232021) next »