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 photographic color filters to an image. |
last modified: December 15, 2018
USAGE: colorfilter [-m method] [-c color] [-d density] infile [maskfile] outfile
-m ... method .... method of applying color filter; choices are 1 or 2; PURPOSE: To apply a photographic color filter to an image. DESCRIPTION: COLORFILTER applies a photographic color filter to an image. Optionally, a grayscale mask file can be provided to limit the region to be processed. This script simulates the Photoshop Photo Filter function. ARGUMENTS: -m method ... METHOD of applying color filter. Choices are 1 or 2. 1 is blending and 2 is adding. The default=1. -c color ... COLOR of desired filter. Any valid IM opaque color value is valid as well as the following special colors: warming85, warming81, cooling80, cooling82, sepia, underwater, t1000, t1850, t3000, t4100, t5000, t8000, t13000, t21000, t40000. The t-filters correspond to the blackbody radiation color of the given color temperature. The default=red. -d density ... DENSITY of filter. Values are integers between 0 and 100. 0 is no change and 100 is the most change. The default=25 Maskfile is any grayscale image the same size as the infile. The filter is applied most where the mask is white. REQUIREMENTS: IM 6.7.9.0 or higher due to a change in -compose luminize to use the new HCL colorspace rather than the older HSL colorspace.
REFERENCES: 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. |
Table Of Special Colors |
Color Name |
Description |
Color Temperature |
Color |
t1000 |
|
1000 deg |
#ff3300 |
t1850 |
sunrise, sunset or candle flame |
1850 deg |
#ff8000 |
warming85 |
photoshop filter |
|
#ec8a00 |
warming81 |
photoshop filter |
|
#ebb113 |
t3000 |
incandescent light |
3000 deg |
#ffb969 |
t4100 |
moon light |
4100 deg |
#ffd7a6 |
t5000 |
horizon daylight |
5000 deg |
#ffe7cc |
sepia |
photoshop filter |
|
#ac7a33 |
underwater |
photoshop filter |
|
#00c2b1 |
t8000 |
|
8000 deg |
#e5e9ff |
t13000 |
|
13000 deg |
#beceff |
t21000 |
clear blue northern sky |
21000 deg |
#acc0ff |
t40000 |
|
40000 deg |
#a1b7ff |
cooling82 |
photoshop filter |
|
#00b5ff |
cooling80 |
photoshop filter |
|
#006dff |
---|
Example 1 - Method 1 vs Method 2 |
|||
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Example 2 - Warming vs Cooling Filters |
|||
Original |
|||
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Example 3 - Warming with Transparency |
|
Original |
|
> | |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
Example 4 - Warming and Cooling without and with Simple Gradient Mask |
|
Original |
Mask |
Arguments: |
With Mask |
Arguments: |
With Mask |
Example 5 - Warming and Cooling without and with Modified Gradient Mask |
|
Original |
Mask |
Arguments: |
Arguments: |
Arguments: |
Arguments: |
What the script does is as follows:
This is equivalent to the following IM commands for method=1
|