How do I turn an IOSBitmap in an IOSview to a Picture that can be used in a Mobilescreen?
You will first need this in a module (which is available in iOSDesignExtensions)
Public Function ToPictureXC(extends image As iOSImage) As Picture
//Creates an image that will draw and keep its colors
Const UIImageRenderingModeAutomatic = 0
Declare Function imageWithRenderingMode Lib "UIKit.framework" selector "imageWithRenderingMode:" (id As ptr, RenderingMode As Integer) As ptr
Return Picture.FromHandle(imageWithRenderingMode(image.Handle, UIImageRenderingModeAutomatic))
End Function
And use it like this:
Dim p as Picture = theBitmap.image.ToPictureXC
1 Like
Thanks Jeremie
Yes, iOSKit has a screenshot feature in Extensions module > Screenshot
I am sure the code can be adapted to take screenshots of a specific control.