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


Instagram Filters Clone Source Code For Delphi XE5 Firemonkey On Android And IOS

Delphi XE5 Firemonkey Instagram Clone AppOne of the hot apps right now is the Instagram app and if you are looking to build something similar the filter effects are a key component. You easily build an app like Instagram with Delphi XE5 Firemonkey and this post includes demo source code to get you started. I have tested the app on Android and Windows but I think it should also work on IOS and OSX (except for the mobile only functionality). There are three parts to the demo: loading and cropping a photo, applying a filter effect, and sharing the resulting image. Delphi XE5 Firemonkey comes with over 60 different effects for you to use and you can combine them to make even more. The hardest part of getting the filters working are that the drag and drop functionality of filters does not automatically stack as far as I know. What this means is that if you want to combine the effects of two filters you have to do it in code. I searched and searched for the best way to do this and I finally found a way which only takes one line of code to apply a permanent filter to a bitmap. The other big piece of functionality in this demo is using TSelection to crop the image into a square. The math to get the TSelection object to crop correctly was tricky. I had to bring in an expert Delphi developer from oDesk to get the TSelection math right. Lastly I used the Share Sheet demo and the Camera Roll demo from Embarcadero to hook up getting a photo from CameraUI, getting a photo from the Camera Roll, and Sharing the photo at the end using the Share Sheet. I would really like to see some code that calls the Share Sheet without having the assign the action to a button. In any event I am including the demo source code for this app below. I included a default photo in the crop section of the app for testing purposes but for a real app you would remove that.

Download the Instagram Filters Clone Source Code For Delphi XE5 Firemonkey.


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

Related posts

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


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


DelphiCon 2020 FireMonkey Sessions Available Starting November 19


Powerful Commercial Gorilla3D Framework Upgraded For Delphi FireMonkey On Windows And Android

Sign up for our Newsletter and
stay informed


Leave a Reply