Size matters!

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?".
Locked
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Post by el_supremo »

Add the -strip option to the command line. It will remove any profiles, thumbnails, EXIF info etc. that might also be in the input file.

See: http://www.imagemagick.org/script/convert.php

Pete

el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Post by el_supremo »

I have the code for 5.5.6 and strip isn't in there. It looks like it isn't in 5.5.7 either.

One thing you could try is to do an "identify -verbose" on the thumbnails. This will show you whether the file contains embedded info such as an EXIF or ICC profile. If such data is present then identify will show you how much space those profiles consume. My camera produces images with almost 20kB of profile info in them so it is well worth it to be able to strip that info from a thumbnail whose actual image data may be less than 5kB.
If that doesn't show any extra embedded data then:

- for PNG output files you could try "-quality 95" which will give a higher compression level than the default 75 but I don't know how much difference it will make. For the meaning of the quality setting see: http://www.imagemagick.org/script/comma ... hp#quality

- for JPG files the default compression quality is also 75. You could try reducing this number to, say, 40 which will reduce the size of the image file but will also reduce the quality of the image. You'll have to experiment to see if you can find a quality value that gives both acceptably small files and acceptable image quality.

- for GIF files, upgrading to a recent IM would add LZW compression which may not be installed in your 5.5.7

If you do install a more recent version of IM, keep 5.5.7 around just in case.

Pete

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

Post by magick »

In earlier versions of ImageMagick, -strip is equvilalent to +profile "*" +comment.

Locked