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

AndroidAppmethodCode SnippetDelphiFiremonkeyIOSOSXWindows

Create Device Scaled Screenshots In Delphi XE5 Firemonkey On Android And IOS

Delphi XE5 Scaled MakeScreenshotIf you’ve ever used the function MakeScreenshot which is part of most Firemonkey controls on mobile you may have noticed that it does not take a screenshot that is scaled to the device scale. So if you use MakeScreenshot from a TLayout the bitmap you end up with is most likely not the same size as the TLayout on the screen when used on mobile devices like Android and IOS. One solution to this is to get the screen scale using the GetScreenScale found in the TPlatformServices object. I have put together a function that makes this easier to do.

There are a couple StackOverflow questions relevant to to this function and are what I used when researching this function. There is also a topic at Embarcadero about multiresolution bitmaps. They are:

FireMonkey TControl.MakeScreenshot generates an undersized bitmap on Mobile platforms

Firemonkey drawing on bitmap without interpolation

Using Multi-Resolution Bitmaps In Delphi XE5 Firemonkey On Android And IOS

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

Related posts
AndroidC++BuilderCode SnippetDelphiDemoFiremonkeyIOSOSXShowcaseWindows

Powerful Cross Platform Email App Sample In Delphi 10.4.1 FireMonkey For Android And IOS


Significant Update Available For Delphi FireMonkey 10.4.1 On Android, IOS, OSX, Windows, And Linux


Professional SVG Icon Image List For Delphi 10.4 FireMonkey On Windows


Top Tips And Tricks To Speed Up Development With Delphi 10.4 FireMonkey On Android and IOS

Sign up for our Newsletter and
stay informed

1 Comment

Leave a Reply