From 8e2b07f4971e021df7385f15fa042ad04fcbd1bc Mon Sep 17 00:00:00 2001 From: Trancever Date: Thu, 17 Oct 2019 19:49:06 +0200 Subject: [PATCH] feat: make it possible to crop transaprent images on ios --- ios/RNCImageEditor.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/RNCImageEditor.m b/ios/RNCImageEditor.m index 3654af7..899aff0 100644 --- a/ios/RNCImageEditor.m +++ b/ios/RNCImageEditor.m @@ -74,7 +74,7 @@ @implementation RNCImageEditor // Store image NSString *path = [RNCFileSystem generatePathInDirectory:[[RNCFileSystem cacheDirectoryPath] stringByAppendingPathComponent:@"ReactNative_cropped_image_"] withExtension:@".jpg"]; - NSData *imageData = UIImageJPEGRepresentation(croppedImage, 1); + NSData *imageData = UIImagePNGRepresentation(croppedImage); NSError *writeError; NSString *uri = [RNCImageUtils writeImage:imageData toPath:path error:&writeError];