Invert: Difference between revisions

From Avisynth wiki
Jump to navigationJump to search
Raffriff42 (talk | contribs)
m added category
Raffriff42 (talk | contribs)
formatting, links, phrasing *** need Changelog update ***
Line 1: Line 1:
{{Template:FuncDef|Invert(clip ''clip'' [, string ''channels'']) }}
Inverts one or several channels of a clip.
 
{{Template:FuncDef|Invert(clip ''clip'' [, string ''channels''] )}}
 
:{{Par2|clip|clip|}}
::Source video.


Inverts one or several channels of a clip.
:{{Par2|channels|string|(all)}}
::Defines which channels should be inverted by their initial letters, e.g. "R" (=red)
::Any letters that don't correspond to a channel in the current colorspace are ignored.
::Valid channel letters are:
:::''R, G, B & A'' for [[RGB32]] clips
:::''R, G & B'' for [[RGB24]] clips
:::''Y, U & V'' for [[YUV]] clips
::Letters are not case sensitive and may be given in any order.
::By default, all channels of the current colorspace are inverted.


''channels'' defines which channels should be inverted. The default is all channels of the current colorspace. Valid channels are R,G,B,A for RGB clips, and Y,U & V for YUY2 and YV12 clips.
==== Example ====
<div {{BoxWidthIndent|42|1}} >
[[AviSource]]("clip.avi")
[[ConvertToRGB32]]
Invert("BG")    # inverts the blue and green channels
</div>


'''Example:'''
<div {{BoxWidthIndent|42|1}} >
  AviSource("clip.avi")
  [[AviSource]]("clip.avi")
  ConvertToRGB32()
  [[ConvertToRGB24]]
  Invert("BG")  # inverts the blue and green channels
Invert("A")    # no effect (no current ''A'' channel)
Invert("VUY")  # no effect (no current ''Y, U'' or ''V'' channels)
  Invert("g, b")  # inverts the blue and green channels
</div>


'''Changelog:'''
==== Changelog ====
{| border="1"
{| border="1"
|-
| v2.??
| All AviSynth colorspaces are supported.
|-  
|-  
| v2.55
| v2.55

Revision as of 02:44, 19 January 2016

Inverts one or several channels of a clip.

Invert(clip clip [, string channels] )

clip  clip =
Source video.
string  channels = (all)
Defines which channels should be inverted by their initial letters, e.g. "R" (=red)
Any letters that don't correspond to a channel in the current colorspace are ignored.
Valid channel letters are:
R, G, B & A for RGB32 clips
R, G & B for RGB24 clips
Y, U & V for YUV clips
Letters are not case sensitive and may be given in any order.
By default, all channels of the current colorspace are inverted.

Example

AviSource("clip.avi")
ConvertToRGB32
Invert("BG")    # inverts the blue and green channels
AviSource("clip.avi")
ConvertToRGB24
Invert("A")     # no effect (no current A channel)
Invert("VUY")   # no effect (no current Y, U or V channels)
Invert("g, b")  # inverts the blue and green channels

Changelog

v2.?? All AviSynth colorspaces are supported.
v2.55 Added RGB24, YUY2 and YV12 mode.
v2.53 Initial Release