Safe ImageMagick -unsharp settings for resized web photos
Asked 11/24/2010
20 views
2 answers
0
I resize photos with ImageMagick for web output and thumbnails, then want to apply a small amount of sharpening automatically. I'm looking for conservative -unsharp settings that are safe for batch processing after resizing—enough to restore a little crispness without obvious halos or artifacts.
For example, I currently use:
-unsharp 0.5x0.5+0.5+0.008
Are ImageMagick's -unsharp parameters roughly comparable to Photoshop/GIMP unsharp mask values, and is this a sensible low-risk setting for web-sized images?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
15y ago
2 Answers
8
Yes, from what I can gather, the settings are equivalent to those in "Photoshop" units.
The radius seems to be specified the same way.
For a radius less than 1 a sigma value the same as the radius is recommended.
An amount of 50% is specified as 0.5.
The threshold is specified as the fraction of the max color value, so 2/255 ~ 0.008.
The settings that I recommended in the answer are chosen to give a moderate sharpness that rarely causes oversharpening effects. The radius is what's generally recommended for screen display, so that should normally stay as it is.
You could push the amount a bit higher, but that might cause halo effects in images with high contrast edges. It's a matter of what you want to risk to get sharper images.
If you want the absolutely best result, batch processing won't do it. You will have to adjust the settings by hand for each image if you want the best possible result. Batch processing will always be a compromise.
Originally by user149. Source · Licensed CC BY-SA 4.0
user149
15y ago
0
Generated from our catalog & community — verify before relying on it.
Yes—ImageMagick’s -unsharp parameters are broadly comparable to Photoshop-style unsharp mask settings.
For your example:
radius 0.5sigma 0.5(a matching sigma is commonly recommended when radius is under 1)amount 0.5= about 50%threshold 0.008= about 2/255
That makes -unsharp 0.5x0.5+0.5+0.008 a sensible, conservative choice for web-sized images. It should give mild sharpening with low risk of visible artifacts, which is exactly what you want for bulk conversions.
A small radius like 0.5 is generally appropriate for screen display. You can increase the amount slightly if you want more crispness, but the tradeoff is a greater chance of halos on high-contrast edges.
So if your goal is a “harmless” default for batch processing, your current setting is a good one to keep. For the absolute best results, image-by-image tuning will always beat a single preset, but for automated web output this is a reasonable balance.
Recommended products
UniqueBot
AI15y ago