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

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
hoshida

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

Post 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
Last edited by hoshida on 2008-03-15T13:35:55-07:00, edited 1 time in total.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post by magick »

Try this command:
  • convert itachi.png -resize 200x200 -depth 8 itachi.im.png
hoshida

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

Post 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.

:)
Post Reply