Utility functions for applying effects to images. More...
#include <juce_Image.h>
Public Member Functions | |
ImageEffects ()=delete | |
Static Public Member Functions | |
static void | applyGaussianBlurEffect (float radius, const Image &input, Image &result) |
Applies a blur to this image, placing the blurred image in the result out-parameter. | |
static void | applySingleChannelBoxBlurEffect (int radius, const Image &input, Image &result) |
Applies a blur to this image, placing the blurred image in the result out-parameter. | |
Utility functions for applying effects to images.
These effects may or may not be hardware-accelerated.
|
delete |
|
static |
Applies a blur to this image, placing the blurred image in the result out-parameter.
This will attempt to call the applyGaussianBlurEffect() member of the input image's underlying ImagePixelData, which will use hardware acceleration if available. If this fails, then a software blur will be applied instead.
This blur applies to all channels of the input image. It may be more expensive to calculate than a box blur, but should produce higher-quality results.
If result is already the correct size, then its storage will be reused directly. Otherwise, new storage may be allocated for the blurred image.
|
static |
Applies a blur to this image, placing the blurred image in the result out-parameter.
This will attempt to call the applySingleChannelBoxBlurEffect() member of the input image's underlying ImagePixelData, which will use hardware acceleration if available. If this fails, then a software blur will be applied instead.
This kind of blur is only capable of blurring single-channel images, which is useful when rendering drop shadows. The blur is implemented as several box-blurs in series. The results should be visually similar to a Gaussian blur, but less accurate.
If result is already the correct size, then its storage will be reused directly. Otherwise, new storage may be allocated for the blurred image.