Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

AndroidAppmethodCode SnippetDelphiFiremonkeyIOSOSXWindows

Custom Filter Effect Image Shaders In Delphi Firemonkey For Android And IOS

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

Delphi Firemonkey Filters And Shaders | Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

One useful feature of Delphi Firemonkey is that because it draws all the forms using your 3D card you have access to the 3D card’s shader capabilities. The Delphi Firemonkey effect filters are based on this system. Some example effects that you can apply to images are emboss, pencil stroke, sharpen, toon, pixelate, and a whole lot more. However, if you want to write your own shaders and turn them into effect components for use in your IOS and Android apps it can be a daunting task. Thankfully someone else has written up a full blog post with extensive examples on exactly how to use shaders to create your own effects that you can use in Delphi XE5 Firemonkey.

const
  FilterName = 'FrostyOutline';
  //FilterName = 'Emboss';
  //FilterName = 'Invert';
begin
  Filter := FilterByName(FilterName);
  Filter.Values['Height'] := 300;
  Filter.Values['Width'] := 350;
  Filter.ValuesAsBitmap['Input'] := Source.Bitmap;
  Dest.Bitmap := TBitmap(Filter.ValuesAsBitmap['output']);
end;


Check out the full blog post on how to create custom filter effects.

close

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Related posts
DelphiFiremonkeyShowcaseWindows

How To Build Stable Diffusion Text To Image Prompts

AndroidC++BuilderDelphiFiremonkeyIOSOSXWindows

FireMonkey 10.4.2 Features Updated iOS 14, Android 11, And macOS 11 Support Plus Hundreds Of Fixes

DelphiIDEShowcaseWindows

Ryzen 9 5950x: One Billion Lines Of Delphi Code Compiled In ~5 Minutes On 16 Cores

DelphiFiremonkeyIDEIOSOSXWindows

DelphiCon 2020 FireMonkey Sessions Available Starting November 19

Sign up for our Newsletter and
stay informed

Leave a Reply