FireMonkey Image Effects

From RAD Studio

Go Up to FireMonkey Applications Guide

The FireMonkey built-in ImageFX engine provides over 50 GPU-powered effects. These effects are nonvisual components that can be found in the Effects category on the Tool Palette. All the provided effects can be simply enabled or disabled by setting the Enabled flag from the Form Designer, or programmatically.

Almost all the effects have specific properties that you can customize depending on the application. For example, all transition effects have the Progress property, which is used to set the amount of progress (in percentages, %) through the transition from the first texture to the second texture. The specified properties can be found in the Object Inspector when the effect is selected in the Structure View. All numeric properties of any effect can be animated to provide a gradual evolution in time. Image effects can also be triggered.

FireMonkey effects are built using shader filters. The shaders modify pixels, either individually or in concert with others, to achieve various visual effects. These effects are not limited to bitmap image data; effects can be applied to the pixels of any 2D control in the user interface. Effects can be used at run time or at design time to change the look of the user interface of the application. The FireMonkey effects do not disable any controls or functionalities when they are applied.

For more information about applying a FireMonkey effect, see Applying FireMonkey Image Effects.

Kinds of Image Effects

The provided subclasses of TEffect fall into the categories listed in the following table. Each category is further described and illustrated later in this topic.

Effects that modify
pixels individually
Effects that consider
the neighbors of a pixel
Additive effects Effects that modify
the image as a whole
Transition effects

TInvertEffect

TColorKeyAlphaEffect

TMaskToAlphaEffect

TMonochromeEffect

TBloomEffect

TGloomEffect

TContrastEffect

THueAdjustEffect

TFillRGBEffect

TFillEffect

Blur

TBlurEffect

TDirectionalBlurEffect

TBoxBlurEffect

TGaussianBlurEffect

TRadialBlurEffect

Distortions

TBandedSwirlEffect

TBandsEffect

TMagnifyEffect

TPinchEffect

TRippleEffect

TSmoothMagnifyEffect

TSwirlEffect

TWaveEffect

TWrapEffect

TGlowEffect

TInnerGlowEffect

TReflectionEffect

TShadowEffect

TEmbossEffect

TPaperSketchEffect

TPencilStrokeEffect

TPixelateEffect

TSepiaEffect

TSharpenEffect

TToonEffect

TBevelEffect

TAffineTransformEffect

TCropEffect

TNormalBlendEffect

TPerspectiveTransformEffect

TTilerEffect

TBandedSwirlTransitionEffect

TBlindTransitionEffect

TBloodTransitionEffect

TBlurTransitionEffect

TBrightTransitionEffect

TCircleTransitionEffect

TCrumpleTransitionEffect

TDissolveTransitionEffect

TDropTransitionEffect

TFadeTransitionEffect

TLineTransitionEffect

TMagnifyTransitionEffect

TPixelateTransitionEffect

TRippleTransitionEffect

TRotateCrumpleTransitionEffect

TSaturateTransitionEffect

TShapeTransitionEffect

TSlideTransitionEffect

TSwipeTransitionEffect

TSwirlTransitionEffect

TWaterTransitionEffect

TWaveTransitionEffect

TWiggleTransitionEffect


Effects that modify pixels individually

These effects typically apply changes to color. Each pixel color can be considered on its own. The table below shows some of this kind of effect:

Effect Result Description Effect Result Description

None

No effects applied.

TMonochromeEffect

Grayscale transformation.

TInvertEffect

Inverts the color of each pixel

TContrastEffect

Adjusting contrast

THueAdjustEffect

Adjusting hue

Fill effects

TFillRGBEffect or

TFillEffect

Color filling, either preserving alpha or completely overwriting.

Effects that consider the neighbors of a pixel

This type of effect is applied using algorithms that use the neighbors of a pixel to define the new value of the pixel. The table below shows some of this kind of effect:

Blur effects

Effect Result Description Effect Result Description

None

No effects applied.

TGaussianBlurEffect

Gaussian blur

TBoxBlurEffect

Box blur

TDirectionalBlurEffect

Directional blur

TRadialBlurEffect

Radial blur

TBlurEffect

Stack Blur

Various distortions

Effect Result Description Effect Result Description

None

No effects applied.

Swirls effects

TSwirlEffect and

TBandedSwirlEffect

Swirls the input image.

TWaveEffect

Applies a wave patterns

TEmbossEffect

Outlines the input image

TPixelateEffect

Reduces the input details

TMagnifyEffect

Magnifying glass.

Effects that modify the image as a whole

This kinds of effect applies geometric changes over the input image. The table below shows some of this kind of effect:

Effect Result Description Effect Result Description

None

No effects applied.

TCropEffect

Crops the input image.

TAffineTransformEffect

Rotates and scales the input image.

TPerspectiveTransformEffect

3D perspective

TNormalBlendEffect

Overlies two images. This work when the overlay has some transparency.

TTilerEffect

Tiles the input image

Additive effects

This kind of effect affects the images by adding new elements to the original image. The elements can be added to the edges of the image or to the entire image. The table below shows some of this kind of effect:

Effect Opaque image Image with transparent areas Description

None

No effects applied.

TGlowEffect

Adds a glowing band

|TInnerGlowEffect

Adds a glowing band in the interior of the nontransparent areas.

TShadowEffect

Adds shadow to the nontransparent areas.

TReflectionEffect

Adds reflection to the entire image.

TBevelEffect

Adds a bevel to the entire image.

Transition effects

FireMonkey includes over twenty image transition effects, in which source pixels are progressively transformed into a target bitmap image, from simple fades to fancy banded swirls. The progress of the transformation is deterministic and can be set to an arbitrary percentage. This percentage can be animated to transition over time. To animate the progress of the transformation, see Apply an Animation Effect to a Property of an Image Effect.

The table below shows some animated transitions:

Transition Result Transition Result

TBandedSwirlTransitionEffect

TCircleTransitionEffect

TFadeTransitionEffect

TMagnifyTransitionEffect

FireMonkey Image Sample Program

The ShaderFilters sample program demonstrates many of the FireMonkey image effects, except the additive effects and the basic stack blur.

See Also

Samples