nativescript-bitmap-factory
nativescript-bitmap-factory copied to clipboard
Error: The method setNativeSource() expects UIImage instance. > Seems to be CGImage instead.
I'm trying to convert a cropped image to ImageSource but it fails because the native object isn't UIImage but instead CGImage. Converting to base64 or data doesn't work either. I'm running the latest version.
Replace in BitmapFactory.ios.js at crop function section:
from
return UIImage(imageRef);
to
return UIImage.alloc().initWithCGImage(imageRef);