The vizfx.postprocess.color library is a collection of effects that perform various color adjustments.
Convert the colors to grayscale.
Convert the colors to a sepia tone.
Applies a bleach bypass effect on the image, which simulates the skipping of the bleaching function during the processing of color film.
Invert the colors.
Apply an offset to each color channel.
Constructor |
Description |
ColorOffsetEffect( red = 0.0, green = 0.0, blue = 0.0 ) |
Create the color offset effect with the initial red, green, and blue offset values. |
Method | Description |
<effect>.setRedOffset(offset) | Set the offset for the red channel. |
<effect>.getRedOffset() | Get the offset for the red channel. |
<effect>.setGreenOffset(offset) | Set the offset for the green channel. |
<effect>.getGreenOffset() | Get the offset for the green channel. |
<effect>.setBlueOffset(offset) | Set the offset for the blue channel. |
<effect>.getBlueOffset() | Get the offset for the blue channel. |
<effect>.setColorOffset(offset) | Set the offset for the red, green, and blue channels using the specified 3-item list. |
<effect>.getColorOffset() | Get the offset for the red, green, and blue channels. |
This effect can be registered with vizconfig.
Apply a scale factor to each color channel.
Constructor | Description |
ColorScaleEffect( red = 1.0, green = 1.0, blue = 1.0 ) | Create the color scale effect with the initial red, green, and blue scale factors. |
Method | Description |
<effect>.setRedScale(scale) | Set the scale factor for the red channel. |
<effect>.getRedScale() | Get the scale factor for the red channel. |
<effect>.setGreenScale(scale) | Set the scale factor for the green channel. |
<effect>.getGreenScale() | Get the scale factor for the green channel. |
<effect>.setBlueScale(scale) | Set the scale factor for the blue channel. |
<effect>.getBlueScale() | Get the scale factor for the blue channel. |
<effect>.setColorScale(scale) | Set the scale factor for the red, green, and blue channels using the specified 3-item list. |
<effect>.getColorScale() | Get the scale factor for the red, green, and blue channels. |
This effect can be registered with vizconfig.
Apply color correction to the image similar to the "curves" tool found in many popular image editing programs (e.g. Photoshop, Paint.NET).
The effect uses a 256 x 1 lookup texture to perform the color correction. You can use the following steps to create a lookup texture:
Lookup texture used for the image above:
Constructor | Description |
ColorCorrectionEffect(texture) | Create the color correction effect using the specified lookup texture. |
Control the brightness of the image.
Constructor | Description |
BrightnessEffect(brightness = 0.0) | Create the brightness effect with the initial brightness value. The brightness value can range from -1 to 1. |
Method | Description |
<effect>.setBrightness(value) | Set the brightness value. |
<effect>.getBrightness() | Get the brightness value. |
This effect can be registered with vizconfig.
Control the contrast of the image.
Constructor | Description |
ContrastEffect(contrast = 0.0) | Create the contrast effect with the initial contrast value. The contrast value can range from -1 to 1. |
Method | Description |
<effect>.setContrast(value) | Set the contrast value. |
<effect>.getContrast() | Get the contrast value. |
This effect can be registered with vizconfig.
Control the exposure of the image.
Constructor | Description |
ExposureEffect(exposure= 0.0) | Create the exposure effect with the initial exposure value. |
Method | Description |
<effect>.setExposure(value) | Set the exposure value. A positive value will over-expose the image. A negative value will under-expose the image. |
<effect>.getExposure() | Get the exposure value. |
This effect can be registered with vizconfig.
Adjust the image hue.
Constructor | Description |
HueEffect(hue= 0.0) | Create the hue effect with the initial hue value. |
Method | Description |
<effect>.setHue(value) | Set the hue value. The value ranges from -1 to 1. |
<effect>.getHue() | Get the hue value. |
This effect can be registered with vizconfig.
Adjust the image saturation.
Constructor | Description |
SaturationEffect(saturation= 0.0) | Create the saturation effect with the initial saturation value. |
Method | Description |
<effect>.setSaturation(value) | Set the saturation value. The value ranges from -1 to 1. Positive values saturate, and negative values desaturate. |
<effect>.getSaturation() | Get the saturation value. |
This effect can be registered with vizconfig.
Adjust image vibrance by modifying saturation of desaturated colors.
Constructor | Description |
VibranceEffect(vibrance= 0.0) | Create the vibrance effect with the initial vibrance value. |
Method | Description |
<effect>.setVibrance(value) | Set the vibrance value. The value ranges from -1 to 1. Positive values add vibrance, and negative values remove vibrance. |
<effect>.getVibrance() | Get the vibrance value. |
This effect can be registered with vizconfig.
Applies gamma correction to the image.
Constructor | Description |
GammaCorrectionEffect(gamma = 1.0) | Create the gamma correction effect with the initial gamma value. Most displays and graphics cards support gamma correction, so this effect is usually unnecessary. Most displays have a gamma of approximately 2.2. |
Method | Description |
<effect>.setGamma(value) | Set the gamma value. |
<effect>.getGamma() | Get the gamma value. |
This effect can be registered with vizconfig.
Posterizes the image (reduces number of increments in the color values).
Constructor | Description |
PosterizeEffect(increments = 255) | Create the posterize effect with the initial number of color value increments. |
Method | Description |
<effect>.setIncrements(value) | Set the number of color value increments. |
<effect>.getIncrements() | Get the number of color value increments. |
This effect can be registered with vizconfig.