How to avoid upscaling very small images when thumbnailing

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
phy9pas

How to avoid upscaling very small images when thumbnailing

Post by phy9pas »

Hello, this seems like it should be a simple thing to do, but I can't find any examples anywhere.

I'm using the following command to thumbnail images

-quality 100 "$source" -thumbnail "100x100" "$dest"

But I want to skip any images which are smaller than 100x100, otherwise it seems to upscale small images to fit.

Thanks in advance.

Pete
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to avoid upscaling very small images when thumbnaili

Post by fmw42 »

User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: How to avoid upscaling very small images when thumbnaili

Post by anthony »

See IM Examples, Resize - only shrink larger images
http://www.imagemagick.org/Usage/resize/#shrink
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
phy9pas

Re: How to avoid upscaling very small images when thumbnaili

Post by phy9pas »

That's done the trick.
Cheers guys.

Pete
Post Reply