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. |
Adjusts the tone in shadow and highlight areas of an image. |
last modified: August 27, 2020
USAGE: shadowhighlight [-sa samount] [-sw swidth] [-sr sradius] [-ha hamount] [-hw hwidth] [-hr hradius] [-ma mamount] [-ca camount] [-bc bclip] [-wc wclip] infile outfile
-sa ... samount ... shadow amount; 0<=integer<=100; default=50 PURPOSE: To adjust the tone in shadow and highlight areas of an image. DESCRIPTION: SHADOWHIGHLIGHT adjusts the tone in shadow and highlight areas of an image. Shadow areas may be lightened and highlight areas darkened using the amount arguments. The tonal width arguments adjust the range of shadow and/or highlight tones that will be adjusted. The radius arguments adjust the regions around each pixel that are used to determine whether a pixel is shadow or highlight. All processing is done in the LAB colorspace. This script attempts to emulate the Photoshop function of the same name. ARGUMENTS: -sa samount ... SAMOUNT is the shadow enhancement amount. Values are 0<=integers<=100. The default=50. -sw swidth ... SWIDTH is the shadow tonal width. Values are 0<=integers<=100. The default=50. -sr sradius ... SRADIUS is the shadow radius in pixels. Values are floats>=0. The default=30. -ha samount ... HAMOUNT is the highlight enhancement amount. Values are 0<=integers<=100. The default=50. -hw swidth ... HWIDTH is the highlight tonal width. Values are 0<=integers<=100. The default=50. -Hr sradius ... HRADIUS is the highlight radius in pixels. Values are floats>=0. The default=30. -ma samount ... MAMOUNT is the midtone enhancement amount. Values are -100<=integers<=100. The default=0. -ca camount ... CAMOUNT is the color correction amount. Values are -100<=integers<=100. The default=0. -bc bclip ... BCLIP is the black clip percent. Values are 0<=floats<=100. The default=0.01. -wc wclip ... WCLIP is the white clip percent. Values are 0<=floats<=100. The default=0.01. REQUIREMENTS: IM 6.7.8.2 or higher, due to the use of the LAB colorspace. However, results were not stable until 6.7.8.8 REFERENCES: http://www.photoshopessentials.com/photo-editing/shadow-highlight/ 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. |
Examples |
Original |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
What the script does is as follows for border=black at the top/bottom edges:
This is equivalent to the following IM commands
|