Skip to content

Commit 31d45c9

Browse files
authored
feat: make it possible to crop transaprent images on ios (#39)
1 parent ec57369 commit 31d45c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ios/RNCImageEditor.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ @implementation RNCImageEditor
7474
// Store image
7575
NSString *path = [RNCFileSystem generatePathInDirectory:[[RNCFileSystem cacheDirectoryPath] stringByAppendingPathComponent:@"ReactNative_cropped_image_"] withExtension:@".jpg"];
7676

77-
NSData *imageData = UIImageJPEGRepresentation(croppedImage, 1);
77+
NSData *imageData = UIImagePNGRepresentation(croppedImage);
7878
NSError *writeError;
7979
NSString *uri = [RNCImageUtils writeImage:imageData toPath:path error:&writeError];
8080

0 commit comments

Comments
 (0)