Page 1 of 1

[ok] Produced PNG by I.M. have a too big file size

Posted: 2008-03-15T09:46:56-07:00
by hoshida
Hello

Here is an example :
The original image is PNG (rvb), size: 256x256, file size: 37KB
Link to the image : Image

I want to resize with "convert" to 200x200, so I use this command line :

Code: Select all

convert itachi.png -resize 200x200 itachi.im.png
The size/resolution is OK, 200x200 px, but the file size is too big : 80KB ! (twice the original although the picture have a smaller resolution.)
Link to the image : Image

Now, if i trie an other command line program, nconvert (from xnview author), with this command line :

Code: Select all

nconvert -resize 200 200 -o itachi.nv.png itachi.png
I obtain a 200x200px PNG which only is 28 KB !!
Link to the image : Image

I prefer to use convert (IM), it's a very advanced program, but file size is important too, especially for websites.

So, what is the better way to correct this problem ?

Thanks For Paying Attention

Precision : I work on Linux and the version of IM is : ImageMagick 6.3.9 03/09/08 Q1

Re: Produced PNG by I.M. have a too big file size

Posted: 2008-03-15T13:06:08-07:00
by magick
Try this command:
  • convert itachi.png -resize 200x200 -depth 8 itachi.im.png

Re: Produced PNG by I.M. have a too big file size

Posted: 2008-03-15T13:35:26-07:00
by hoshida
Oh, thanks, it solves the case.

With -depth 8, the result is : 28.7 KB
and if i use -scale instead of -resize : 28.4 KB

After that with optipng and it's all good.

:)