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. |
Modifies an image to automatically stretch the dynamic range between full black and white. |
last modified: December 15, 2018
USAGE: stretch [-c colormode] infile outfile
-c .... colormode ..... colorspace/channel to use to compute PURPOSE: To modify an image to automatically stretch the dynamic range between full black and white. DESCRIPTION: STRETCH modifies an image to automatically stretch the dynamic range between full black and white. No gamma correction is applied. The minimum and maximum values may be computed from various graylevel representations of the image or individually channel-by-channel. The script then passes these values to the IM function -level. ARGUMENTS: -c colormode ... COLORMODE is the colorspace/channel(s) to use to compute the minimum and maximum values. The choices are: global, intensity, luminance, lightness, rgb and sl. The default is luminance. Global uses aggregate statistics from all the channels. Intensity uses statistics from -colorspace Gray (Rec609Luma). Luminance uses statistics from -colorspace Rec709Luma. Lightness uses statistics from the lightness channel of -colorspace HSL. RGB uses statistics independently from each channel of -colorspace RGB. SL uses statistics independently from each the S,L channels of -colorspace HSL. See definitions at: http://www.imagemagick.org/script/command-line-options.php#colorspace Note: generally there are only slight differences between the various non-rgb colormode results. Colormode=rgb can cause color balance shifts. 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. |
Variations On Colormode In Low Contrast Image |
|||||
Original Image |
|||||
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Variations On Colormode In Low Contrast Image |
||
Original Image |
||
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
What the script does is as follows:
This is equivalent to the following IM commands for the luminance colormode.
|