Re: GD2 gif resizing problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);

Can anyone explain or have a solution?

Here's my take -- gif's are no longer supported by the GD library because of patent problems. So development of how to deal with them has been moved to png.

Gif's have a 256 color palette, but PNG has a 48-bit color palette and using imagecreatetruecolor() you greatly increase the file size of the image .

A better choice for your code would be to use imagecreate() which has a maximum of 256 color palette.

Please post if this works or not.

tedd

--
--------------------------------------------------------------------------------
http://sperling.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux