[magick-users] Re: How to properly downsize an image
John J Foerch
jjfoerch at earthlink.net
Sat Mar 29 16:07:58 PDT 2008
T o n g <mlist4suntong at yahoo.com> writes:
> Hi,
>
> What's the proper way to downsize an image?
>
> I want to downsize my 1152x864 image to 500x, so I did:
>
> convert -resize 500x screenshot.png screenshot-thumbnail.png
>
> I was thinking that the downsized thumbnail should be around 1/4 of the
> original size, but I am totally wrong:
>
> $ identify screenshot*
> screenshot-thumbnail.png PNG 500x375 500x375+0+0 DirectClass 509kb
> screenshot.png[1] PNG 1152x864 1152x864+0+0 DirectClass 82kb
>
> $ ls -l screenshot*
> -rw-r--r-- 1 tong tong 521280 03-29 16:54 screenshot-thumbnail.png
> -rw-r--r-- 1 tong tong 83876 2007-01-01 screenshot.png
>
> The size is not smaller but over 6 times bigger.
>
> I remember that I need to something extra, so I tried the following, but
> that didn't help. The thumbnail is the same size as before:
>
> convert -size 500x375 -resize 500x screenshot.png screenshot-thumbnail.png
>
> Please help.
>
> Thanks
You are probably using an imagemagick compiled with quantum depth 16,
so images you produce have 16 bits per channel. `-depth 8' will
produce 8 bit images, reducing file size. The arg order in your
convert commands is also wrong.. see
http://imagemagick.org/Usage/basics/
John Foerch
More information about the Magick-users
mailing list