Copyright © Fred Weinhaus My scripts are available free of charge for non-commercial (non-profit) use, ONLY. For use of my scripts in commercial (for-profit) environments or non-free applications, please contact me (Fred Weinhaus) for licensing arrangements. My email address is fmw at alink dot net. If you: 1) redistribute, 2) incorporate any of these scripts into other free applications or 3) reprogram them in another scripting language, then you must contact me for permission, especially if the result might be used in a commercial or for-profit environment. Usage, whether stated or not in the script, is restricted to the above licensing arrangements. It is also subject, in a subordinate manner, to the ImageMagick license, which can be found at: http://www.imagemagick.org/script/license.php Please read the Pointers For Use on my home page to properly install and customize my scripts. |
Changes the color saturation in an image. |
last modified: December 15, 2018
USAGE: saturation [value] infile outfile
value ................ saturation gain factor (float); PURPOSE: To change the color saturation in an image. DESCRIPTION: SATURATION changes the color saturation in an image in a linear manner. The image is first converted to HSL colorspace and then the saturation value is used as a multiplier for each value in the S channel. Then the modified saturation channel is recombined with the H and L channels and the image is converted to RGB colorspace as output. ARGUMENTS: value --- value is the saturation factor. It is a multiplier for the saturation channel in an image. Values greater than 1.0 will increase the saturation of the image and values less than 1.0 will decrease the saturation of the image. The default is 1.0 or no gain. Note: must specify the decimal point and one digit following it. CAVEAT: No guarantee that this script will work on all platforms, nor that trapping of inconsistent parameters is complete and foolproof. Use At Your Own Risk. |
Increasing Saturation | ||||
Original Image |
Arguments: |
Arguments: | ||
![]() |
![]() |
![]() |
Decreasing Saturation | ||||
Original Image |
Arguments: |
Arguments: | ||
![]() |
![]() |
![]() |
What the script does is as follows:
This is equivalent to the following IM commands for
|