Converting tif to gif file size too big

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
not2late

Converting tif to gif file size too big

Post by not2late »

Hi guys,
I tried to search this topic but couldn't get an answer.
I was using on our dec alpha ImageMagick 5.3.0 04/01/01 Q:16

A simple conversion from a file size of 20KB tif was 50KB gif.

After the upgrade to the latest ImageMagick version on a suse blade, the new gif file is about 4 MB in size.

Try this one 16KB: http://www.mys.co.jp/MSA25.tif

A conversion on the new system gives me 4MB size but on the old system gives me 25KB

/usr/bin/convert MSA25.tif MSA25.gif

I want to keep the same size but not sure what is wrong.

Thanks
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Converting tif to gif file size too big

Post by fmw42 »

not2late wrote:Hi guys,
I tried to search this topic but couldn't get an answer.
I was using on our dec alpha ImageMagick 5.3.0 04/01/01 Q:16

A simple conversion from a file size of 20KB tif was 50KB gif.

After the upgrade to the latest ImageMagick version on a suse blade, the new gif file is about 4 MB in size.

Try this one 16KB: http://www.mys.co.jp/MSA25.tif

A conversion on the new system gives me 4MB size but on the old system gives me 25KB

/usr/bin/convert MSA25.tif MSA25.gif

I want to keep the same size but not sure what is wrong.

Thanks
Try adding -depth 8

/usr/bin/convert MSA25.tif -depth 8 MSA25.gif
not2late

Re: Converting tif to gif file size too big

Post by not2late »

tried that already as I have seen it recommended in other posts but no luck: /usr/bin/convert MSA25.tif -depth 8 MSA25.gif

Can someone please try it? I want to know if where to look. In my installation or in how to use imagemagick convert.

Thanks
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Converting tif to gif file size too big

Post by magick »

We're using ImageMagick 6.4.5-7 and your command produces a GIF image at 284085 bytes.
not2late

Re: Converting tif to gif file size too big

Post by not2late »

Thank you. it must be something with our installation. We are on Suse 9 and can't upgrade the OS at this point. Have no clue where can I look.

The generated image is 4 MB in size. It can be seen with any viewer. So the conversion is right but the size is big.

Is there anything you recommend I should check?
not2late

Re: Converting tif to gif file size too big

Post by not2late »

We were able to compile 6.4.5 on suse 9. Everything is working fine now.

Thank you very much
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Converting tif to gif file size too big

Post by anthony »

WARNING: be careful as a known bug in the recent versions causes the dither to reduce the colors in a GIF image is a much smaller number, whcih naturally results in a smaller image size.

As you are converting from a 24 bit direct color source to a 8 bit pallette color image, you probably should get about 256 colors in the final image. if you get about 64 colors, then the image is degraded due to the bug.

The bug is being worked on, and will hopefully be fixed soon.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply