Page 1 of 1

convert PNG to GIF results in bigger files

Posted: 2007-10-22T06:57:48-07:00
by moo
Hello,

I'm trying to convert a series of PNG images into GIF, but the resulting files are 4 times bigger:

test.png -> 4.6K

$ convert test.png test.gif

test.gif -> 21K

even if I do:
$ convert test.png -colors 128 test.gif
still the resulting gif file is 19K.

Is there a way to extract the color palette from the PNG file and use that palette for the GIF or something similar that would produce good results?

Thanx.

Re: convert PNG to GIF results in bigger files

Posted: 2007-10-22T16:53:52-07:00
by anthony
PNG only has a palette in certain conditions. and will use that palette is the image is unchanged.

Try adding -compress LWZ and see if that fixes the problem.

Re: convert PNG to GIF results in bigger files

Posted: 2007-10-23T00:16:41-07:00
by moo
Hi anthony,

Thanx for the hint.
Apparently I have an older version of IM where LZW compression wasn't compiled in. upgrading IM fixed it.

Regards,