TweakColor: Difference between revisions
From Avisynth wiki
Jump to navigationJump to search
Raffriff42 (talk | contribs) redirect for convenient searching |
mNo edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{FilterCat5|External_filters|Plugins|Plugins_x64|Adjustment_filters|Levels and Chroma filters}} | |||
{{ | {{Filter3 | ||
|{{Author/Trevlac}} | |||
|2004/04/12 | |||
|[x86]: [http://trevlac.us/colorCorrection/TweakColor.zip TweakColor.zip] | |||
----------- | |||
[x64]: [http://rationalqm.us/misc/TweakColor.rar TweakColor.rar] | |||
|Levels and Chroma | |||
|[http://www.gnu.org/licenses/gpl-2.0.txt GPLv2] | |||
|6=[http://forum.doom9.org/showthread.php?t=74334 Doom9 Forum]}} | |||
<br> | |||
== Description == | |||
[[TweakColor]] has the ability to target specific hue and saturation ranges for hue and saturation adjustments. For example, you can target highly saturated reds (> 75% saturated) and reduce just them, leaving things like skin tones alone. | |||
Based on the built in [[Tweak]] filter. | |||
<br> | |||
<br> | |||
== Requirements == | |||
* [x86]: [[AviSynth+]] or [https://sourceforge.net/projects/avisynth2/ AviSynth 2.6] | |||
* [x64]: [[AviSynth+]] | |||
* Supported color formats: [[YUY2]], [[YV12]] | |||
<br> | |||
== [[Script variables|Syntax and Parameters]] == | |||
:{{Template:FuncDef|TweakColor (clip, float "hue", float "sat", float "bright", float "cont", bool "coring", int "startHue", int "endHue", int "maxSat", int "minSat", int "smooth")}} | |||
<br> | |||
::{{Par2| |clip| }} | |||
:::Input clip. | |||
<br> | |||
::{{Par2|hue|float|0.0}} | |||
:::Adjust the color hue of the image. | |||
:::* {{FuncArg|hue}}>0.0 shifts the image towards red. | |||
:::* {{FuncArg|hue}}<0.0 shifts the image towards green. | |||
:::Range -180.0 to +180.0, default=0.0 | |||
<br> | |||
::{{Par2|sat|float|1.0}} | |||
:::Adjust the color saturation of the image by controlling gain of the color channels. | |||
:::* {{FuncArg|sat}}>1.0 increases the saturation. | |||
:::* {{FuncArg|sat}}<1.0 reduces the saturation. | |||
:::Use sat=0 to convert to [[GreyScale]]. | |||
:::Range 0.0 to 10.0, default=1.0 | |||
<br> | |||
::{{Par2|bright|float|0.0}} | |||
:::Change the brightness of the image by applying a constant bias to the luma channel. | |||
:::*{{FuncArg|bright}}>0.0 increases the brightness. | |||
:::*{{FuncArg|bright}}<0.0 decreases the brightness. | |||
::: Range -255.0 to 255.0, default=0.0 | |||
<br> | |||
::{{Par2|cont|float|1.0}} | |||
:::Change the contrast of the image by multiplying the luma values by a constant. | |||
:::*{{FuncArg|cont}}>1.0 increase the contrast (the luma range will be stretched). | |||
:::*{{FuncArg|cont}}<1.0 decrease the contrast (the luma range will be contracted). | |||
:::Range 0.0 to 10.0, default=1.0 | |||
<br> | |||
::{{Par2|coring|bool|true}} | |||
:::When set to <code>true</code> (the default), the luma (Y) and chroma are clipped to TV-range; | |||
:::When set to <code>false</code>, the luma and chroma are unconstrained. | |||
<br> | |||
::{{Par2|startHue|int|0}} | |||
:::Starting hue to effect, in degrees. Exact magenta is ~ 50 degrees. | |||
:::Colors are 60 degrees apart. +/-30 around center covers full color. | |||
:::Colors run clockwise: magenta(50), red(110), yellow(170), green(230), cyan(290), blue(350) | |||
:::Range: 0 to 359, default=0 | |||
<br> | |||
::{{Par2|endHue|int|359}} | |||
:::Ending hue. If < {{FuncArg|startHue}}, we go clockwise. | |||
:::Range: 0 to 359, default=359 | |||
<br> | |||
::{{Par2|maxSat|int|115}} | |||
:::Max saturation level to effect. Sat is in percents running from 115%-0%. | |||
:::Default=115 | |||
<br> | |||
::{{Par2|minSat|int|0}} | |||
:::Min saturation level to effect. Must be < {{FuncArg|maxSat}}. | |||
:::Default=0 | |||
<br> | |||
::{{Par2|smooth|int|16}} | |||
:::Interpolates past max/min sats to smooth out changes (avoid contours). | |||
:::Range: 0-64, default=16 | |||
<br> | |||
== Examples == | |||
TweakColor with default settings: | |||
[[AviSource]]("blah.avi") | |||
TweakColor(hue=0.0, sat=1.0, bright=0.0, cont=1.0, coring=true, startHue=0, endHue=359, maxSat=115, minSat=0, smooth=16) | |||
<br> | |||
== Changelog == | |||
Version Date Changes<br> | |||
2020/04/14 2020/04/20 - Update to AviSynth 2.6 api | |||
- x64 binary only | |||
- updated by [https://forum.doom9.org/showthread.php?p=1907625#post1907625 videoh]<br> | |||
2004/04/12 2004/04/12 - Initial release | |||
<br> | |||
== Archived Downloads == | |||
{| class="wikitable" border="1"; width="600px" | |||
|- | |||
!!width="100px"| Version | |||
!!width="150px"| Download | |||
!!width="150px"| Mirror | |||
|- | |||
!2020/04/14 (x64) | |||
|[http://rationalqm.us/misc/TweakColor.rar TweakColor.rar] | |||
|[https://web.archive.org/web/20200604235640if_/http://rationalqm.us/misc/TweakColor.rar TweakColor.rar] | |||
|- | |||
!2004/04/12 (x86) | |||
|[http://trevlac.us/colorCorrection/TweakColor.zip TweakColor.zip] | |||
|[https://web.archive.org/web/20160606142213if_/http://trevlac.us/colorCorrection/TweakColor.zip TweakColor.zip] | |||
|} | |||
<br> | |||
==External Links == | |||
<br> | |||
<br> | |||
----------------------------------------------- | |||
'''Back to [[External_filters#Levels_and_Chroma|External Filters]] ←''' | |||
----------------------------------------------- | |||
Latest revision as of 18:07, 10 June 2020
| Abstract | |
|---|---|
| Author | Trevlac |
| Version | 2004/04/12 |
| Download | [x86]: TweakColor.zip
[x64]: TweakColor.rar |
| Category | Levels and Chroma |
| License | GPLv2 |
| Discussion | Doom9 Forum |
Description
TweakColor has the ability to target specific hue and saturation ranges for hue and saturation adjustments. For example, you can target highly saturated reds (> 75% saturated) and reduce just them, leaving things like skin tones alone.
Based on the built in Tweak filter.
Requirements
- [x86]: AviSynth+ or AviSynth 2.6
- [x64]: AviSynth+
- Supported color formats: YUY2, YV12
- TweakColor (clip, float "hue", float "sat", float "bright", float "cont", bool "coring", int "startHue", int "endHue", int "maxSat", int "minSat", int "smooth")
- clip =
- Input clip.
- clip =
- float hue = 0.0
- Adjust the color hue of the image.
- hue>0.0 shifts the image towards red.
- hue<0.0 shifts the image towards green.
- Range -180.0 to +180.0, default=0.0
- Adjust the color hue of the image.
- float hue = 0.0
- float sat = 1.0
- Adjust the color saturation of the image by controlling gain of the color channels.
- sat>1.0 increases the saturation.
- sat<1.0 reduces the saturation.
- Use sat=0 to convert to GreyScale.
- Range 0.0 to 10.0, default=1.0
- Adjust the color saturation of the image by controlling gain of the color channels.
- float sat = 1.0
- float bright = 0.0
- Change the brightness of the image by applying a constant bias to the luma channel.
- bright>0.0 increases the brightness.
- bright<0.0 decreases the brightness.
- Range -255.0 to 255.0, default=0.0
- Change the brightness of the image by applying a constant bias to the luma channel.
- float bright = 0.0
- float cont = 1.0
- Change the contrast of the image by multiplying the luma values by a constant.
- cont>1.0 increase the contrast (the luma range will be stretched).
- cont<1.0 decrease the contrast (the luma range will be contracted).
- Range 0.0 to 10.0, default=1.0
- Change the contrast of the image by multiplying the luma values by a constant.
- float cont = 1.0
- bool coring = true
- When set to
true(the default), the luma (Y) and chroma are clipped to TV-range; - When set to
false, the luma and chroma are unconstrained.
- When set to
- bool coring = true
- int startHue = 0
- Starting hue to effect, in degrees. Exact magenta is ~ 50 degrees.
- Colors are 60 degrees apart. +/-30 around center covers full color.
- Colors run clockwise: magenta(50), red(110), yellow(170), green(230), cyan(290), blue(350)
- Range: 0 to 359, default=0
- int startHue = 0
- int endHue = 359
- Ending hue. If < startHue, we go clockwise.
- Range: 0 to 359, default=359
- int endHue = 359
- int maxSat = 115
- Max saturation level to effect. Sat is in percents running from 115%-0%.
- Default=115
- int maxSat = 115
- int minSat = 0
- Min saturation level to effect. Must be < maxSat.
- Default=0
- int minSat = 0
- int smooth = 16
- Interpolates past max/min sats to smooth out changes (avoid contours).
- Range: 0-64, default=16
- int smooth = 16
Examples
TweakColor with default settings:
AviSource("blah.avi") TweakColor(hue=0.0, sat=1.0, bright=0.0, cont=1.0, coring=true, startHue=0, endHue=359, maxSat=115, minSat=0, smooth=16)
Changelog
Version Date Changes
2020/04/14 2020/04/20 - Update to AviSynth 2.6 api - x64 binary only - updated by videoh
2004/04/12 2004/04/12 - Initial release
Archived Downloads
| Version | Download | Mirror |
|---|---|---|
| 2020/04/14 (x64) | TweakColor.rar | TweakColor.rar |
| 2004/04/12 (x86) | TweakColor.zip | TweakColor.zip |
External Links
Back to External Filters ←