Skip to content

Clamp

Brief Description

Restrict the pixel values in the image to a range. If Minimum is enabled, the values below the minimum are set to the Minimum. If Minimum Value is enabled, the minimum values are set to this value instead of Minimum. This is useful for example to make everything below 0 become 1.

If Maximum is enabled, the values above the maximum are set to the Maximum. If Maximum Value is enabled, the maximum values are set to this value instead of Maximum. This is useful for example to make everything above 1 become 0.

Controls

Parameter / Script Name Type Default Function
Enabled / enabled Boolean On
Red / process_red Boolean On Enable the red channel in output. Otherwise if there's a source the content of the main source is returned instead, else 0
Green / process_green Boolean On Enable the green channel in output. Otherwise if there's a source the content of the main source is returned instead, else 0
Blue / process_blue Boolean On Enable the blue channel in output. Otherwise if there's a source the content of the main source is returned instead, else 0
Alpha / process_alpha Boolean On Enable the alpha channel in output. Otherwise if there's a source the content of the main source is returned instead, else 0
Minimum Enabled / minimum_enabled Boolean On Enable low clamp
Minimum / minimum Color 0, 0, 0, 0 The low clamp value
Maximum Enabled / maximum_enabled Boolean On Enable high clamp
Maximum / maximum Color 1, 1, 1, 1 The high clamp value
Enable Min Value / min_clamp_value_enabled Boolean Off When checked, all values below minimum are clamped to the Min Value value. When unchecked, all values below minimum are clamped to the minimum value.
Min Value / min_clamp_value Color 0, 0, 0, 0 The value to which low illegal values are clamped when Enable Min Value is checked. This sets the clamped areas to a custom color, allowing you to visualize the clamped range or create graphical effects.
Enable Max Value / max_clamp_value_enabled Boolean Off When checked, all values above maximum are clamped to the Max Value value. When unchecked, all values above maximum are clamped to the maximum value.
Max Value / max_clamp_value Color 1, 1, 1, 1 The value to which high illegal values are clamped when Enable Max Value is checked. This sets the clamped areas to a custom color, allowing you to visualize the clamped range or create graphical effects.
Mask / mask Image -
Mix / mix_with_source Float 1 Dissolves between the original image at 0 and the image with the effect applied at 1