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

Error creating thumbnail: Unable to save thumbnail to destination TInvertEffect

Error creating thumbnail: Unable to save thumbnail to destination TColorKeyAlphaEffect

Error creating thumbnail: Unable to save thumbnail to destination TMaskToAlphaEffect

Error creating thumbnail: Unable to save thumbnail to destination TMonochromeEffect

Error creating thumbnail: Unable to save thumbnail to destination TBloomEffect

Error creating thumbnail: Unable to save thumbnail to destination TGloomEffect

Error creating thumbnail: Unable to save thumbnail to destination TContrastEffect

Error creating thumbnail: Unable to save thumbnail to destination THueAdjustEffect

Error creating thumbnail: Unable to save thumbnail to destination TFillRGBEffect

Error creating thumbnail: Unable to save thumbnail to destination TFillEffect

Blur

Error creating thumbnail: Unable to save thumbnail to destination TBlurEffect

Error creating thumbnail: Unable to save thumbnail to destination TDirectionalBlurEffect

Error creating thumbnail: Unable to save thumbnail to destination TBoxBlurEffect

Error creating thumbnail: Unable to save thumbnail to destination TGaussianBlurEffect

Error creating thumbnail: Unable to save thumbnail to destination TRadialBlurEffect

Distortions

Error creating thumbnail: Unable to save thumbnail to destination TBandedSwirlEffect

Error creating thumbnail: Unable to save thumbnail to destination TBandsEffect

Error creating thumbnail: Unable to save thumbnail to destination TMagnifyEffect

Error creating thumbnail: Unable to save thumbnail to destination TPinchEffect

Error creating thumbnail: Unable to save thumbnail to destination TRippleEffect

Error creating thumbnail: Unable to save thumbnail to destination TSmoothMagnifyEffect

Error creating thumbnail: Unable to save thumbnail to destination TSwirlEffect

Error creating thumbnail: Unable to save thumbnail to destination TWaveEffect

Error creating thumbnail: Unable to save thumbnail to destination TWrapEffect

Error creating thumbnail: Unable to save thumbnail to destination TGlowEffect

Error creating thumbnail: Unable to save thumbnail to destination TInnerGlowEffect

Error creating thumbnail: Unable to save thumbnail to destination TReflectionEffect

Error creating thumbnail: Unable to save thumbnail to destination TShadowEffect

Error creating thumbnail: Unable to save thumbnail to destination TEmbossEffect

Error creating thumbnail: Unable to save thumbnail to destination TPaperSketchEffect

Error creating thumbnail: Unable to save thumbnail to destination TPencilStrokeEffect

Error creating thumbnail: Unable to save thumbnail to destination TPixelateEffect

Error creating thumbnail: Unable to save thumbnail to destination TSepiaEffect

Error creating thumbnail: Unable to save thumbnail to destination TSharpenEffect

Error creating thumbnail: Unable to save thumbnail to destination TToonEffect

Error creating thumbnail: Unable to save thumbnail to destination TBevelEffect

Error creating thumbnail: Unable to save thumbnail to destination TAffineTransformEffect

Error creating thumbnail: Unable to save thumbnail to destination TCropEffect

Error creating thumbnail: Unable to save thumbnail to destination TNormalBlendEffect

Error creating thumbnail: Unable to save thumbnail to destination TPerspectiveTransformEffect

Error creating thumbnail: Unable to save thumbnail to destination TTilerEffect

Error creating thumbnail: Unable to save thumbnail to destination TBandedSwirlTransitionEffect

Error creating thumbnail: Unable to save thumbnail to destination TBlindTransitionEffect

Error creating thumbnail: Unable to save thumbnail to destination TBloodTransitionEffect

Error creating thumbnail: Unable to save thumbnail to destination TBlurTransitionEffect

Error creating thumbnail: Unable to save thumbnail to destination TBrightTransitionEffect

Error creating thumbnail: Unable to save thumbnail to destination TCircleTransitionEffect

Error creating thumbnail: Unable to save thumbnail to destination TCrumpleTransitionEffect

Error creating thumbnail: Unable to save thumbnail to destination TDissolveTransitionEffect

Error creating thumbnail: Unable to save thumbnail to destination TDropTransitionEffect

Error creating thumbnail: Unable to save thumbnail to destination TFadeTransitionEffect

Error creating thumbnail: Unable to save thumbnail to destination TLineTransitionEffect

Error creating thumbnail: Unable to save thumbnail to destination TMagnifyTransitionEffect

Error creating thumbnail: Unable to save thumbnail to destination TPixelateTransitionEffect

Error creating thumbnail: Unable to save thumbnail to destination TRippleTransitionEffect

Error creating thumbnail: Unable to save thumbnail to destination TRotateCrumpleTransitionEffect

Error creating thumbnail: Unable to save thumbnail to destination TSaturateTransitionEffect

Error creating thumbnail: Unable to save thumbnail to destination TShapeTransitionEffect

Error creating thumbnail: Unable to save thumbnail to destination TSlideTransitionEffect

Error creating thumbnail: Unable to save thumbnail to destination TSwipeTransitionEffect

Error creating thumbnail: Unable to save thumbnail to destination TSwirlTransitionEffect

Error creating thumbnail: Unable to save thumbnail to destination TWaterTransitionEffect

Error creating thumbnail: Unable to save thumbnail to destination TWaveTransitionEffect

Error creating thumbnail: Unable to save thumbnail to destination 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

Error creating thumbnail: Unable to save thumbnail to destination

No effects applied.

TGlowEffect

Error creating thumbnail: Unable to save thumbnail to destination

Adds a glowing band

|TInnerGlowEffect

Error creating thumbnail: Unable to save thumbnail to destination

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

TShadowEffect

Error creating thumbnail: Unable to save thumbnail to destination

Adds shadow to the nontransparent areas.

TReflectionEffect

Error creating thumbnail: Unable to save thumbnail to destination

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