Home
RecentChanges

Search:

» AviSynth is a powerful video FrameServer for Win32.

AviSynth Links:
»Download
»Learn to script
»FAQ
»Manual
»Discussion fora
»Project page
»External filters
»FeedBack

» You can add pages to this website immediately. No login required.
Edit this document

» AboutAviSynth

 

Avisynth 
Logo

RGBAdjust

( Diese Seite in flag-germany.gif Deutsch )

RGBAdjust(clip clip [, float red] [, float green] [, float blue] [, float alpha] [, float rb] [, float gb] [, float bb] [, float ab] [, bool analyze])

This filter multiplies each color channel with the given value, clipping the result at 255. Note that RGBAdjust(1, 1, 1, 1) leaves the clip untouched.

Red (0.0-255.0; default 1.0): This option determines how much red is to be scaled. For example, a scale of x 3 multiplies the red channel of each pixel by 3. Green and blue work similar.

alpha (0.0-255.0; default 1.0) specifies the alpha channel, that is it represents the transparency information on a per-pixel basis. An alpha value of zero represents full transparency, and a value of 1 represents a fully opaque pixel.

In v2.56 the offsets rb, gb, bb, ab (default 0.0) add a value to the red, green, blue or alpha channels. For example, rb = 16 will add 16 to the red pixel values and -32 will subtract 32 from all red pixel values.

In v2.56 analyze (can be true or false) will print out color statistics on the screen. There are maximum and minimum values for all channels. There is an average and a standard deviation for all channels. There is a "loose minimum" and "loose maximum". The "loose" values are made to filter out very bright or very dark noise creating an artificially low or high minimum / maximum (it just means that the amount of red/green/blue of 255/256 of all pixels is above (under) the loose minimum (maximum)).

Keep in mind ALL the values are not scaled to accomodate changes to one (for that you should use levels) so doing something like:

RGBAdjust(2, 1, 1, 1)

will get you a whole lot of clipped red. If you WANT a whole lot of clipped red, there ya go - but if you want MORE red without clipping you'd do

Levels(0, 1, 255, 0, 128).RGBAdjust(2, 1, 1, 1)

This would scale all the levels (and average lum) by half, then double the red. Or more compact

RGBAdjust(1.0, 0.5, 0.5, 1.0)

This leaves the red and halves the green and blue.

To invert the alpha channel

RGBAdjust(a=-1.0, ab=255)

Thus alpha pixels values become a=(255-a).

Changes

v2.56 added offsets, analyze

SourceForge Logo

 


Edit this document | View document history
Document last modified Sun, 30 Jan 2005 10:40:22