How to sharpen and increase saturation of *.jpg picture?

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
bensto
Posts: 31
Joined: 2012-07-02T00:32:10-07:00
Authentication code: 13

How to sharpen and increase saturation of *.jpg picture?

Post by bensto »

Assume I have a *.jpg picture and want to

1.) sharpen it by lets say 10% (whatever it means)

2.) Increase saturation by 12%

How can I achieve the two tasks with ImageMagick?

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

Re: How to sharpen and increase saturation of *.jpg picture?

Post by fmw42 »

There is no good way to convert sharpening to percentage that I know offhand. When you sharpen you provide a filter sigma or a radius. The filter tapers in a Gaussian manner, so not linearly. You need to calibrate your sigma with whatever degree of sharpening you like. You could over sharpen and then control how much is combined with the image. That would be the gain factor. So you could do a factor of 1.1, which amounts to 10% of whatever over sharpening you want. See unsharp arguments at https://imagemagick.org/script/command- ... hp#unsharp

Saturation on the other hand can be measured as a percent. So you could do -modulate Brightness,Saturation,Hue as -modulate 100,110,100, where 100 means no change. See https://imagemagick.org/script/command- ... p#modulate
Post Reply