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 Photoshop-like curves operation on an image that only adjusts the linear endpoints. |
last modified: December 15, 2018
USAGE: endpoints [-l lowpt] [-h highpt] [-u units] [-c channels ] infile outfile
-l ... lowpt ....... lowpt input,output graylevels as pair of PURPOSE: To apply a Photoshop-like curves operation that only adjusts the linear endpoints. DESCRIPTION: ENDPOINTS applies a Photoshop-like curves operation on an image that only adjusts the linear endpoints. Processing can be applied globally (i.e. to the rgb channels equally), to the rgb channels independently or to the luminosity channel from YUV. ARGUMENTS: -l lowpt ... LOWPT input,output graylevels as pair of comma separate non-negative floats. The default="0,0". -h highpt ... HIGHPT input,output graylevels as pair of comma separate non-negative floats. The default="0,0. -u units ... UNITS to use for lowpt and highpt values. The choices are: percent (p) for 0 to 100 percent or 8bit (8) for 0 to 255. The default=8bit. -c channels ... CHANNELS are the channel or channels to process. The choices are: all (a) i.e., R,G,B equally, red (r), green (g) or blue (b). The default=all. 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. |
Example 1 -- Gradient |
||
Arguments: |
Image |
Profile |
Original |
||
Arguments: |
Example 2 - Cowboy Image |
|
Original |
Arguments: |
Original |
Arguments: |
Original |
Arguments: |
Original |
Arguments: |
Example 2 - Photoshop Curves Equivalent |
|
Original |
|
Select Lower Left (low) End Point 1 |
Select Upper Right (high) End Point 2 |
Result |
|
What the script does is as follows:
This is equivalent to the following IM commands for the "all" case using 8bit values.
|