nativescript-bitmap-factory icon indicating copy to clipboard operation
nativescript-bitmap-factory copied to clipboard

Error: The method setNativeSource() expects UIImage instance. > Seems to be CGImage instead.

Open trashbytes opened this issue 6 years ago • 1 comments

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.

trashbytes avatar Apr 19 '18 10:04 trashbytes

Replace in BitmapFactory.ios.js at crop function section:

from

return UIImage(imageRef);

to

return UIImage.alloc().initWithCGImage(imageRef);

adfdev avatar Aug 24 '19 08:08 adfdev