in reply to Proportionally resizing of images

You should create the thumbnail images yourself, not have the server do it. Ordinary resizing with -geom 100x100 in ImageMagick will constrain the images to that size bounding box, but maintain their original aspect ratio, which is what you want.

The PerlMonk tr/// Advocate

Replies are listed 'Best First'.
Re: Re: Proportionally resizing of images
by halley (Prior) on May 10, 2004 at 16:37 UTC
    You can also use -geometry "100x100>" to mean, "resize to fit inside 100x100 but only if it was too large." Note the quotes on the command line to avoid shell redirection. This avoids the problem where the image was 16x16 and looks blurry when stretched.

    --
    [ e d @ h a l l e y . c c ]

•Re: Re: Proportionally resizing images
by merlyn (Sage) on May 10, 2004 at 17:37 UTC
    You should create the thumbnail images yourself, not have the server do it.
    I'm presuming that's a typo, and you meant "client" or "browser" where you said "server".

    When you use "dumbnails", the server downloads the full original file (thus defeating the whole point of thumbnails), and then your browser is tasked to making that big image fit inside a teeny-tiny space.

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.

      I understood him to be suggesting that the server might generate the thumbnails while it was generating the thumbnail page. Otherwise what's the point of talking about having ImageMagick on the server?

      The PerlMonk tr/// Advocate