Fred's ImageMagick Scripts
|
Modifies an image to automatically stretch the dynamic range between full black and white. |
last modified: July 28, 2009
|
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.
|