[magick-users] Re: Best ways to decrease size of image

Mikolaj Machowski mikmach at wp.pl
Thu Mar 6 10:18:42 PST 2008


Anthony Thyssen scripsit:
> Mikolaj Machowski on  wrote...
>| Hello,
>| 
>| Anthony on his incomparable pages writes very much about increasing size
>| of image and how to get the best results but relatively little about
>| decreasing size.
>| 
>| What is the best way(s) to achieve that?
>| 
> Actually I write about both on the resize page.

But concentrating more on time of operation, not quality (apart from
very specific examples like lines).

> However for heavy resizing smaller, there is a seperate page.
> IM Examples, thumbnails
>    http://imagemagick.org/Usage/thumbnails/

Not really relevant to my case :(

My images aren't thumbnails per se (eg. I want to preserve whole
metadata), also because original format is tiff -size doesn't apply.
All additional eye-candy also is irrelevant - although maybe for use for
preparing CD/DVD covers.

>| To get decent results when doing transition from 4000x4000 tiff to
>| 1000x1000 jpg I am doing something like that:
>| 
>| convert pic.tiff -depth 8 -density 72 -resize 1000x1000 -filter lanczos
>| -unsharp 1x1+0.6 -sampling-factor 1x1 -quality 90 pic.jpg
>| 
>| If I want better result I can make it in two or three steps and
>| manipulation unsharp mask. Any ideas how to do it better?
>| 
> The -depth would do nothing in the above command.

Not in my case. When working with Q16 it shaves off 10-15% of
execution time per image.

> while -density only sets the image density for the output image,
> so probably should be given at the end with -sampling-factor.

Thanks.

> The -filter setting however must be specified BEFORE the -resize
> command!!!  It is also the default for image shrinking when no
> transparency is involved, so it is not even needed!!!

I prefer explicit :) Thanks for placing tip.

m.



More information about the Magick-users mailing list