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

Anthony Thyssen anthony at griffith.edu.au
Thu Mar 6 17:00:02 PST 2008


Mikolaj Machowski on  wrote...
| 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).
| 
Time!!  I don't concentrate on time.   But on quality!!!!!

Of course I do talk about time more in the individual commands,
but after that everything is on quality!!!!


| > 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.
| 
Fair enough.

| >| 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.
| 
Strange.  I don't see how.  That setting only effects image output,
and a few raw image input formats.  Should bave very little effect
on operators as images are still in memory using 16 bit values.

Basically I am suprised by this statement.

prehaps Chrisy can shead some light on this subject.


| > 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.
| 
No problem.

The 'Basics' page explains how things are processed.

Though it can be hard for begineers to know what are 'settings' and what
are 'operators'.  I try throught IM examples to define that status every
time I mention some option.  That is by using the word 'operator' or
'setting' instead of just 'option'.


  Anthony Thyssen ( System Programmer )    <A.Thyssen at griffith.edu.au>
 -----------------------------------------------------------------------------
    Always secure your files, you never know who is lurking about.
                                  -- Rick Cook, "The Wizardry Compiled"
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/


More information about the Magick-users mailing list