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.
Download the full source code for the White & Gold Or Blue & Black app for Delphi XE7 Firemonkey.