File size increase With resize parameter

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
David Bethel
Posts: 6
Joined: 2014-01-18T07:00:10-07:00
Authentication code: 6789

File size increase With resize parameter

Post by David Bethel »

Greetings,

6.8.8-Q16

I'm a newbie to ImageMagick, so I have some really basic needs

I can successfully create an animated gif using the following : ( 100 bmp frames @ 1024x768 )

Code: Select all

onvert.exe -resize 512x384 -delay 33 -brightness-contrast 15 -type optimize -dispose none c:/bmp/*.bmp -loop 0  c:/acad/1000.gif
To my surprise, the file size increased with the use of -rsize and / or -type . I would have thought there would have been a substantial decrease. Am I missing some thing?

Approx 1.2 MB to 1.5 MB

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

Re: File size increase With resize parameter

Post by fmw42 »

You have a different colormap for each frame. Try using a common colormap. See -remap http://www.imagemagick.org/Usage/quantize/#remap but use +dither or -dither none.

see also
http://www.imagemagick.org/Usage/anim_opt/#colortables
http://www.imagemagick.org/Usage/video/#gif
David Bethel
Posts: 6
Joined: 2014-01-18T07:00:10-07:00
Authentication code: 6789

Re: File size increase With resize parameter

Post by David Bethel »

Thank you !

The +map and +remap reduced the size to 1MB.

The remap to colortable.gif reduced it to 500KB. The brightness parameter became unacceptable, but that is not a big deal ( black turned into hunter green )

I will reread the links that you a few time as the terms and details are quite new to me.

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

Re: File size increase With resize parameter

Post by fmw42 »

Make sure your colormap image contains black.
David Bethel
Posts: 6
Joined: 2014-01-18T07:00:10-07:00
Authentication code: 6789

Re: File size increase With resize parameter

Post by David Bethel »

As my images are cartoonish, I used the colortable.gif from the link that you provided. I will flood fill the black dot with pure black #000000 just to be sure.

Thanks! -David

You should perhaps create a colortable from your input images. Perhaps average all your input images (or many of them over the sequence), reduce to 256 colors and extract the colortable. Then choose how many colors (<=256) you want to use and create an image from those colors, by appending

convert xc:color1 xc:color2 ... xc:color256 -append colortable.gif
Post Reply