How to reduce the kb size of image

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
prashant.chourasiya

How to reduce the kb size of image

Post by prashant.chourasiya »

I am trying to append two images, height of both images are same. KB size of first image is varying but kb size of second image is fixed( 1kb ). When I append both images then the new image size is over 160KB.

I need to reduce the kb size of newly created image.
Is there any way to do it while appending images or any way to reduce the kb size of an existing image?

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

Re: How to reduce the kb size of image

Post by fmw42 »

there are a number of things to consider, but some are image type dependent. you did not say what image type you are using -- JPG, GIF, PNG, TIFF, etc

1) -depth 8
see http://www.imagemagick.org/script/comma ... .php#depth

2) -type palette
see http://www.imagemagick.org/script/comma ... s.php#type

3) -quality
see http://www.imagemagick.org/script/comma ... hp#quality

4) -colors
see http://www.imagemagick.org/script/comma ... php#colors and http://www.imagemagick.org/Usage/quantize/#colors

5) PNG8
see http://www.imagemagick.org/Usage/formats/#png_formats

6) -map (common color table)
see http://www.imagemagick.org/Usage/quantize/#map
Post Reply