Inefficient Resizing of GIFs

18 views
Skip to first unread message

Deadlock

unread,
Dec 2, 2011, 2:57:58 PM12/2/11
to Smart Lencioni Image Resizer
Hey there,

Firstly, thanks for this wonderful piece of software. :)

I have an issue that I hope you can help with.

I have a large number of GIF images that are basically white on black
line drawings. Average resolution comes in at around 1000x800, and
average file sizes for those GIF files are around 100-200 kilobytes.

However, when running these images through SLIR, say for example to a
700px wide output, what is being loaded is a very large 250k+ PNG file
that significantly impacts my page loading times.

I have tried ajusting the quality parameter, but it seems to make
little difference (both in image quality and file size).

Couple of questions:

1) Is there any necessary reason why GIFs must be output as PNGs?
2) Any way of getting around this?

Thanks.

Joe Lencioni

unread,
Dec 2, 2011, 7:29:17 PM12/2/11
to smart-lencioni...@googlegroups.com
If I remember correctly, I made SLIR convert gifs to pngs primarily because it is easier to deal with transparency. However, I'm not sure that is the exact reason why the filesize is larger. When resampling the image, to make hard lines appear similarly, a lot of shading happens, which increases the number of colors in the file, which causes the filesize to be larger.

To get around this conversion to PNG, you would need to rewrite some of the code.

In any case, could you please send me a sample file or two? That would be helpful.

Thanks!
Joe

Deadlock

unread,
Dec 2, 2011, 10:50:37 PM12/2/11
to Smart Lencioni Image Resizer
Thanks Joe.

Here's a couple of samples: http://www.xrcmedia.com/temp/samples.zip

In it are two sample images with two files each - the original GIF,
and the signficantly smaller (in terms of resolution) but
significantly larger (in terms of file size) PNG.

If you could point me in the right direction regarding the rewriting
of the code to help with this, I would be very grateful.

Thanks again.
Rudi

Reply all
Reply to author
Forward
0 new messages