An internet meme surrounding a photo of a dress that appears white and gold or blue and black depending on who you are has made all the news. I wanted to turn the dress photo into an app in Delphi XE7 Firemonkey which would allow me to apply the built in Firemonkey effects to the image. I built the app in 5-7 minutes (according to the Castalia statistics) from start to deployment on a Nexus 7 Android tablet. It should also run on IOS, Windows, and OSX. The final size of the Android APK file is 6.86 MB (mainly consisting of the Firemonkey run time library). I used the THueAdjustEffect component and the TContrastEffect component on a TImageControl control. There are TTrackBar controls set up at the bottom of the app that change the value of the Hue, Contrast, and Brightness using the three effects. Only one effect can be applied at a time using the drag and drop components so Hue and Contrast/Brightness won’t stack on each other. You can find out more about stacking Firemonkey effects in another post. Full source code is provided in the download and it should also compile in Appmethod. Deploy it to your own device and amaze your friends with your magically color changing dress or with the fact that this entire multi device app was literally built in 5 minutes using the power of Delphi.
FMXExpress.com has over 700 tips and tricks for building cross platform apps on Android, IOS, OSX, Windows, and Linux with a single codebase and single UI using the FireMonkey framework found in Delphi and C++Builder.
FMXExpress covers top cross platform secrets for FireMonkey in C++Builder and Delphi XE5, XE6, XE7, XE8, Seattle, Berlin, Tokyo, Rio, and Sydney.