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. |
Removes a color cast from an image. |
last modified: August 15, 2022
USAGE: removecolorcast [-m mixing] [-a autolevel] [-c cspace]
[-B brightness] [-C contrast] [-S saturation] [infile] [outfile]
-m ... mixing ....... mixing amount between input image and color filter; PURPOSE: To remove a color cast from an image. DESCRIPTION: REMOVECOLORCAST removes a color cast from an image by blending the image and a color filter generated from the 180 deg hue shifted average color of the image. The method of filtering use -compose colorize. ARGUMENTS: -m mixing ... MIXING amount between the input image and a self generating color filter. The values are 0<=integers<=100. The default=50. -c cpsace ... CSPACE is the colorspace for processing. The choices are: sRGB or RGB. The default=sRGB. Using sRGB results in a slightly warmer result. Using RGB results in a slightly cooler result. -a autolevel ... AUTOLEVEL applies a dynamic range stretch of the result. The choices are: yes or no. The default=yes. -B brightness ... BRIGHTNESS change as a postprocessing step. Value are -100<=integer<=100. The default=0. -C contrast ... CONTRAST change as a postprocessing step. Value are -100<=integer<=100. The default=0. -S saturation ... SATURATION change as a postprocessing step. Value are -100<=integer<=100. The default=0. RECOMMEND: IM 6.8.5.4 or higher due to fluctuating changes to IM sRGB and RGB color spaces prior to that version. Otherwise, results may or may not reproduce the effect properly, depending upon IM version. 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 |
Original Image |
Arguments: |
Arguments: |
Example 2 |
Original Image |
Arguments: |
Arguments: |
Example 3 |
Original Image |
Arguments: |
Arguments: |
Example 4 |
Original Image |
Arguments: |
Arguments: |
What the script does for m=morphology is as follows:
|