A chain of image filters (as CSS filter), applied in order with Gin's applyX functions, parsed from a spec string of names, each followed by its value where it takes one.
More...
#include <gin_animated.h>
A chain of image filters (as CSS filter), applied in order with Gin's applyX functions, parsed from a spec string of names, each followed by its value where it takes one.
It applies only to images drawn through the image helpers (AnimatedImageFilter, drawBlend), not to arbitrary components:
| Name | Value | Function |
| brightness | -100..100, 0 = none | applyBrightnessContrast (img, v, 0) |
| contrast | -100..100, 0 = none | applyBrightnessContrast (img, 0, v) |
| hue | -180..180 degrees | applyHueSaturationLightness (img, v, 100, 0) |
| saturation | 0..200, 100 = none | applyHueSaturationLightness (img, 0, v, 0) |
| lightness | -100..100, 0 = none | applyHueSaturationLightness (img, 0, 100, v) |
| gamma | above 0, 1 = none | applyGamma |
| sharpen | (none) | applySharpen |
| soften | (none) | applySoften |
| greyscale | (none) | applyGreyScale |
| sepia | (none) | applySepia |
| invert | (none) | applyInvert |
e.g. "contrast 30 saturation 130" or "greyscale brightness -20".
- See also
- AnimatedImageFilter
◆ ImageFilter()
| ImageFilter::ImageFilter |
( |
| ) |
|
|
default |
◆ fromSpec()
| std::optional< ImageFilter > ImageFilter::fromSpec |
( |
const juce::String & | spec | ) |
|
|
static |
- Returns
- std::nullopt for an unknown name or a missing or malformed value
◆ apply()
| void ImageFilter::apply |
( |
juce::Image & | img | ) |
const |
Applies the chain to the image in place.
◆ isEmpty()
| bool ImageFilter::isEmpty |
( |
| ) |
const |
◆ operator==()
| bool ImageFilter::operator== |
( |
const ImageFilter & | other | ) |
const |
The documentation for this class was generated from the following file: