Commands for ImageMagick to create thumbnails
13,433
Check out the ImageMagick documentation:
- For a specific size http://www.imagemagick.org/Usage/thumbnails/#fit
- For watermarks http://www.imagemagick.org/Usage/annotating/#watermarking
The best quality possible is complicated since difference images compress differently. I'm partial to PNG since it has a variety if compression techniques available to allow for experimentation.
Author by
StackOverflowNewbie
Updated on June 04, 2022Comments
-
StackOverflowNewbie almost 2 years
Given an photograph uploaded by a user, what is best approach to creating a number various sized thumbnails Using ImageMagick (or GraphicsMagick)? My guess to the steps:
- Create a super sample of the image, maintaining original aspect ratio
- Apply watermark to super sample
- Create the various sized thumbnails using the watermarked super sampled image
Additional requirements:
- Best quality possible (does this mean PNG over JPG?)
- Smallest file size possible (does this mean JPG over PNG?)
- Use density of 72x72, units is ppi
Since I am not that familiar with the intricacies of IM (or GM), some guidance to the best commands that meet my objectives would be highly appreciated. Thanks.
-
StackOverflowNewbie over 13 yearsI'm familiar with the basic commands. As a matter of fact, I can already do what I need to do. The problem is that I am not sure if my approach is the best. There are so many options to ImageMagick.
-
John Percival Hackworth over 13 yearsI'd suggest using the commands recommended in the docs, since they're known to work. Supersampling an image for scaling down is largely pointless.
-
Meetai.com almost 10 yearsBetter to put those commands here, as it's a headache to read that documentation.