[geeklog-devel] Image resizing with gdlib
Tom Willett
tomw at pigstye.net
Thu Sep 30 09:57:58 EDT 2004
I was playing with the automatic image resizing using gdlib this morning and
noticed something wrong.
The image resize works correctly but the link in the article is wrong. The
image is converted to png but the article points to the picture as a gif.
The image is correctly converted to png and resized and resides in the image
directory, the link is simply wrong. Here is the debug information:
Thu 30 Sep 2004 08:35:17 AM EST - Debug: File size for 2milmap.gif is 14617
bytes
Thu 30 Sep 2004 08:35:17 AM EST - Debug: File, 2milmap.gif is of mime type
image/gif and IS an image file.
Thu 30 Sep 2004 08:35:17 AM EST - Debug: in _getImageDimensions I got a
width of 790, and a height of 423
Thu 30 Sep 2004 08:35:17 AM EST - Debug: Max allowed width = 300, Image
width = 790
Thu 30 Sep 2004 08:35:17 AM EST - Debug: Max allowed height = 300, Image
height = 423
Thu 30 Sep 2004 08:35:17 AM EST - Debug: File, 2milmap.gif has a width of
790 and a height of 423
Thu 30 Sep 2004 08:35:17 AM EST - Debug: File, 2milmap.gif is of mime type
image/gif and IS an image file.
Thu 30 Sep 2004 08:35:17 AM EST - Debug: in _getImageDimensions I got a
width of 790, and a height of 423
Thu 30 Sep 2004 08:35:17 AM EST - Debug: Max allowed width = 300, Image
width = 790
Thu 30 Sep 2004 08:35:17 AM EST - Debug: Max allowed height = 300, Image
height = 423
Thu 30 Sep 2004 08:35:17 AM EST - Debug: File, 2milmap.gif has a width of
790 and a height of 423
Thu 30 Sep 2004 08:35:17 AM EST - Debug: in _getImageDimensions I got a
width of 790, and a height of 423
Thu 30 Sep 2004 08:35:17 AM EST - Debug: Going to resize image to 300x160
using gdlib
Thu 30 Sep 2004 08:35:17 AM EST - Debug: converting GIF to PNG
Thu 30 Sep 2004 08:35:17 AM EST - Debug: Deleting
GIF: /var/www/html/images/articles/20040930083457840_1.gif
Thu 30 Sep 2004 08:35:17 AM EST - Debug: Resizing image,
factor=0.37974683544304
Thu 30 Sep 2004 08:35:17 AM EST - Debug: Image, 2milmap.gif was resized from
790x423 to 300x160
Am I missing a setting somewhere?
I set config.php to:
$_CONF['image_lib'] = 'gdlib';
and left the rest default.
Running on Fedora Core 2
PHP 4.3.8
Apache 2.0.51
GD 2.0.23 with gif, jpg, and png support
--
Tom Willett
tomw at pigstye.net
More information about the geeklog-devel
mailing list