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. |
Applies a sigmoidal brightness and/or contrast adjustment to an image |
last modified: December 15, 2018
USAGE: sigmoidal [-b bri] [-c con] [-C channels] [-l lutlength] [-g] infile outfile
-b ... bri ........... brightness change; float; positive increases brightness; PURPOSE: To apply a sigmoidal brightness and/or contrast adjustment to an image. DESCRIPTION: SIGMOIDAL applies a sigmoidal brightness and/or contrast adjustment to an image. The contrast change is the IM -/+sigmoidal-contrast con,50%. The brightness change is the IM -/+sigmoidal-contrast bri,0%. Thus it is half the sigmoidal curve. The bri values are 10 time larger than those used in the IM function and the con values are 5 time larger than those used in the IM function. The transformation is generated as a 1D lut and applied to the image using -clut to affect the desired brightness and/or contrast transformation. The transformation is sensitive to the specified channels. This script is similar to, but not exactly identical to the Photoshop new (CS3 or higher) brightness contrast function. ARGUMENTS: -b bri ... BRI is the amount of brightness change. Values are positive or negative floats. Positive values increase the brightness, while negative values decrease the brightness. The default=0 for no change. -c con ... CON is the amount of contrast change. Values are positive or negative floats. Positive values increase the contrast, while negative values decrease the contrast. The default=0 for no change. -C channels ... CHANNELS are any valid IM combination of channels corresponding to the image's colorspace to which to apply the transformation. Combinations include: r,g,b,a, or c,m,y,k,a (with no commas). The default=all non-alpha channels. -l lutlength ... LUTLENGTH is the length of 1D lut. Values are integers>0. The default=1000. -g ... enables the creation of a graph of the knee curve mapping transformation, which is then displayed automatically. There is a default setting below that can be changed to enable this to be save to a file named outfile_kneegraph.gif. The graph will be scaled to size 100x100. image. REQUIREMENTS: IM 6.3.5-7 is required to support the use of -clut NOTE: Negative values for con do not work properly between IM 6.7.6.4 and IM 6.7.8.2 inclusive due to bug in +contrast-stretch 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. |
Increase Brightness |
||||
Original Image |
||||
arguments: |
arguments: |
arguments: |
arguments: | |
Decrease Brightness |
||||
Original Image |
||||
arguments: |
arguments: |
arguments: |
arguments: | |
Increase Contrast |
||||
Original Image |
||||
arguments: |
arguments: |
arguments: |
arguments: | |
Decrease Contrast |
||||
Original Image |
||||
arguments: |
arguments: |
arguments: |
arguments: | |
Adjust Brightness And Contrast |
||||
Original Image |
||||
arguments: |
arguments: |
arguments: |
arguments: | |
What the script does is as follows:
This is equivalent to the following IM commands for increased brightness
|