Resultant image size over expected

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
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Resultant image size over expected

Post by fmw42 »

epoussif wrote:I use convert -append to build a big image based on a group of tiles. They are .jpg. As far as I understood, convert generates an uncompressed version of each tile, make the appending into an uncompressed resultant file and then it's compressed again. But my result is about 40% bigger than the sume of the sizes of the original pictures.
Am I doing something wrong? I don't want to loose quality, but I don't need less compression than in the input files (I don't know their compression values).
Thanks in advance,
Ernesto
IM does not know or use the jpg compression quality of the input images and defaults to its own compression quality of 85. You will need to add -quality XX to your command at the end to force a quality that gives you acceptable image size.

Also if you are on a 16-bit IM and had 8-bit images, IM will produce a 16-bit result. So you may want to add -depth 8 to your command line.

See
http://www.imagemagick.org/script/comma ... .php#depth
http://www.imagemagick.org/script/comma ... hp#quality
http://www.imagemagick.org/Usage/formats/#jpg
Post Reply