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. |
Transform an image's overall color balance according to a desired change in a specified white point color. |
last modified: December 16, 2018
USAGE: whitebalance [x,y] [-c color] [-r refcolor] infile outfile
x,y .................. x,y coordinate in the image to get color to PURPOSE: To transform an image's overall color balance according to a desired change in a specified white point color. DESCRIPTION: WHITEBALANCE transforms an image's overall color balance according to a desired change in a specified white point color. The white point color may be specified by selecting a pixel coordinate (position) to extract the color or by specifying the color that should be transformed to pure white. One or the other must be specified, but not both. The white point color values (actually any color value as an r,g,b triple in the range of 0 to 255) may be specified. ARGUMENTS: x,y ... x,y are the coordinates in the image where the color is to be extracted and transformed to pure white. -c color ... COLOR is the color to be used to transform to pure white. Any IM color specification is valid. Be sure to enclose it in double quotes. One or the other of the above must be provided, but not both. -r refcolor ... REFCOLOR is the reference color to which to match. Any IM color specification is valid. Be sure to enclose it in double quotes. The default="white". 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. |
White Balance Transformation Of An Image |
|||
Original Image |
Arguments: |
Arguments: |
Arguments: |
What the script does is as follows:
This is equivalent to the following IM commands:
|