H Haris Hafeez Active Member Licensed User Longtime User Jun 26, 2015 #1 I'm trying to get the UIImage object that is wrapped by the B4IBitmap object to use in a library. I have tried using UIImage* img = (UIImage *) b4iImageObject.object; But this doesn't work. Can someone give a hint as to how to use the wrapped object directly? I'm doing this because I'm trying to load the bitmap into an object that requires a UIImage* as the parameter. This is in relation to loading local files reliably for the photo browser library both in DEBUG and RELEASE modes. I have found that one way to handle this is to let the user pass Bitmap objects from their b4i code to the library, which can then get the UIImage* object that is wrapped by the bitmap. Or perhaps it doesn't work this way? Thanks.
I'm trying to get the UIImage object that is wrapped by the B4IBitmap object to use in a library. I have tried using UIImage* img = (UIImage *) b4iImageObject.object; But this doesn't work. Can someone give a hint as to how to use the wrapped object directly? I'm doing this because I'm trying to load the bitmap into an object that requires a UIImage* as the parameter. This is in relation to loading local files reliably for the photo browser library both in DEBUG and RELEASE modes. I have found that one way to handle this is to let the user pass Bitmap objects from their b4i code to the library, which can then get the UIImage* object that is wrapped by the bitmap. Or perhaps it doesn't work this way? Thanks.
Erel B4X founder Staff member Licensed User Longtime User Jun 26, 2015 #2 The compiler will do it automatically for you. Just set the method parameter type to: UIImage*. Upvote 0
H Haris Hafeez Active Member Licensed User Longtime User Jun 26, 2015 #3 Erel said: The compiler will do it automatically for you. Just set the method parameter type to: UIImage*. Click to expand... Thanks. So if I'm iterating over a list of bitmaps, I can simply treat each item in the B4IList as a UIImage* ? Upvote 0
Erel said: The compiler will do it automatically for you. Just set the method parameter type to: UIImage*. Click to expand... Thanks. So if I'm iterating over a list of bitmaps, I can simply treat each item in the B4IList as a UIImage* ?