File size increase with convert

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
User avatar
magick
Site Admin
Posts: 10995
Joined: 2003-05-31T11:32:55-07:00

Post by magick » 2006-04-21T07:14:52-07:00

The -scale option introduces new colors so one might expect an increase in size. You can fix by using -sample or by using -colors to reduce the number of colors in the image.

User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Post by glennrp » 2006-04-21T08:19:23-07:00

Besides using -sample or -colors, you could write PNG with -quality 90
and probably get somewhat smaller files. ../glenn

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

Post by magick » 2006-04-26T12:05:49-07:00

Are you using a modern version of ImageMagick, 5.5.7 or above? Older versions of ImageMagick did not compress GIF images because of the LZW compression patent.

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

Post by magick » 2006-04-28T11:20:32-07:00

We get
  • -rw------- 1 magick magick 1432 Apr 20 08:20 pillsbury_bf10.gif
    -rw------- 1 magick magick 1439 Apr 28 13:48 pillsbury_bf10SMALL.gif

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

Post by magick » 2006-04-28T13:14:56-07:00

The -scale option increases the size because it introduces new colors. With -sample we go from 1432 to 534 bytes with your command.

Post Reply