RGBAdjust
Line 3: | Line 3: | ||
This filter multiplies each color channel with the given value, clipping the result at 255. Note that RGBAdjust(1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1) leaves the clip untouched. | This filter multiplies each color channel with the given value, clipping the result at 255. Note that RGBAdjust(1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1) leaves the clip untouched. | ||
− | ''r'' (0.0-255.0; default 1.0): This option determines how much red is to be scaled. For example, a scale of | + | ''r'' (0.0-255.0; default 1.0): This option determines how much red is to be scaled. For example, a scale of 3 multiplies the red channel of each pixel by 3. ''green'' and ''blue'' work similar. |
''a'' (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. | ''a'' (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. | ||
Revision as of 22:56, 21 January 2016
RGBAdjust(clip clip [, float r] [, float g] [, float b] [, float a] [, float rb] [, float gb] [, float bb] [, float ab] [, float rg] [, float gg] [, float bg] [, float ag] [, bool analyze] [, bool dither])
This filter multiplies each color channel with the given value, clipping the result at 255. Note that RGBAdjust(1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1) leaves the clip untouched.
r (0.0-255.0; default 1.0): This option determines how much red is to be scaled. For example, a scale of 3 multiplies the red channel of each pixel by 3. green and blue work similar. a (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.
Also in v2.56 the exponents rg, gg, bg, ag (default 1.0) adjust the gamma of the red, green, blue or alpha channels. For example, rg = 1.2 will brighten the red pixel values and gg = 0.8 will darken the green 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)).
In v2.60 dither = true/false (false by default): When set to true, ordered dithering is applied when doing the adjustment.
Keep in mind ALL the values are not scaled to accommodate 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, gamma, analyze. |
v2.60 | Added dither. |