Trying to resize some large (~5593 × 3309) JPEGS into smaller thumbnails. Im on MacOS
Quality is important, as this is for a photography website.
I'm currently using: convert "$f" -resize 500x500 -quality 100 -density 300 -set filename:f "%[t]-thumb" "%[filename:f].jpg"
However I'm seeing inconsistent results, and some are of very poor quality (Lines are getting blurry/blocky, see ex2 below.)
Appreciate any suggestions, thank you!
Edit - More Info:
Most images are of architecture/interiors.
Example 1:
Original Image - https://www.rishulbangar.com/img/archit ... 83-min.jpg
Converted Image - https://www.rishulbangar.com/img/archit ... -thumb.jpg
Issue - Can see lots of distortion on the converted image. Would like for it to look crisp.
Can especially be seen on mobile phones.
Example 2:
Original - https://i.imgur.com/3B0Lfv4.jpg
Downsized - https://i.imgur.com/Z9FKrHx.jpg
Issue - Wood planks by the pool are no longer straight lines.
Thank you
Downsizing large JPEGS and maintaining quality
Downsizing large JPEGS and maintaining quality
Last edited by AakLak on 2019-01-03T03:46:07-07:00, edited 4 times in total.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Downsizing large JPEGS and maintaining quality
How are you judging the quality? From a digital display or from print. Changing the density will not change the quality of the output when viewing on a display. It will not improve the quality either by increasing the density. That will only enlarge the image on the print page.
What kind of images are you using? Are they natural scenes, graphics or line drawings? They type of image is important regarding which type of resizing filter you should use.
See
https://imagemagick.org/Usage/filter/
https://imagemagick.org/Usage/filter/nicolas/
In what way are they poor? Is it resolution/blurring or color changes. If the latter, you should include profiles in your processing.
_________________
Please, always provide your IM version and platform when asking questions, since syntax may differ.
Also provide your exact command line and your images, if possible.
See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at http://www.imagemagick.org/discourse-se ... f=1&t=9620
If using Imagemagick 7, then see http://imagemagick.org/script/porting.php#cli
For novices, see
http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown
https://imagemagick.org/script/porting.php#cli
What kind of images are you using? Are they natural scenes, graphics or line drawings? They type of image is important regarding which type of resizing filter you should use.
See
https://imagemagick.org/Usage/filter/
https://imagemagick.org/Usage/filter/nicolas/
In what way are they poor? Is it resolution/blurring or color changes. If the latter, you should include profiles in your processing.
_________________
Please, always provide your IM version and platform when asking questions, since syntax may differ.
Also provide your exact command line and your images, if possible.
See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at http://www.imagemagick.org/discourse-se ... f=1&t=9620
If using Imagemagick 7, then see http://imagemagick.org/script/porting.php#cli
For novices, see
http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown
https://imagemagick.org/script/porting.php#cli
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Downsizing large JPEGS and maintaining quality
Do they look blurry? Downsized photos often look better with some sharpening. I like the method shown at Resampling with halo minimization.
snibgo's IM pages: im.snibgo.com
Re: Downsizing large JPEGS and maintaining quality
Updated OP with more info and example images.
Thanks @fmw42 and @snibgo. I'll try your suggestions.
Any further suggestions based on my sample images (in OP) would be appreciated.
Thank you.
Thanks @fmw42 and @snibgo. I'll try your suggestions.
Any further suggestions based on my sample images (in OP) would be appreciated.
Thank you.
Re: Downsizing large JPEGS and maintaining quality
If you want to keep quality to 100 option `-sampling-factor 1x1` doesn't matter much but is always good thing to include it when dealing with JPGs.
Simple `-unsharp` will do miracles when downsizing. Parameters you have to choose according to your taste. For me `1x1` is good enough although some may find it as oversharpening.
Simple `-unsharp` will do miracles when downsizing. Parameters you have to choose according to your taste. For me `1x1` is good enough although some may find it as oversharpening.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Downsizing large JPEGS and maintaining quality
I am not a photographer. So to me your downsized image looks fine. But other photographers may offer better suggestions than follows here.
I think it depends upon what you think is the issue. If you want more sharpness, you could try -filter catrom (though that is usually more relevant for upsizing). Or use -unsharp. If the issue is artifacts, then use some of the suggestions for downsizing from Nicolas Robidoux at https://imagemagick.org/Usage/filter/nicolas/. But note that JPG is a lossy compression even at -quality 100. Can you not use some other non-lossy compressed file such as PNG or TIFF or JP2000?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Downsizing large JPEGS and maintaining quality
Another downsize-sharpen method I like is Limit min-max. This can sharpen without halos, and also without aliasing (aka jaggies, staircasing).
Of course, you wouldn't start from JPG inputs.
Of course, you wouldn't start from JPG inputs.
snibgo's IM pages: im.snibgo.com