Skip to content

Commit

Permalink
Merge pull request prscX#10 from tonimoeckel/master
Browse files Browse the repository at this point in the history
iOS: Read image as data from path
  • Loading branch information
prscX committed Sep 27, 2018
2 parents 2ca71d9 + 31f44d3 commit e1f3531
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ios/RNPhotoEditor.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ - (void)canceledEditing {
PhotoEditorViewController *photoEditor = [[PhotoEditorViewController alloc] initWithNibName:@"PhotoEditorViewController" bundle: [NSBundle bundleForClass:[PhotoEditorViewController class]]];

// Process Image for Editing
UIImage *image = [UIImage imageWithContentsOfFile:_editImagePath];
NSURL *url = [NSURL URLWithString:_editImagePath];
NSData *data = [NSData dataWithContentsOfURL:url];
UIImage *image = [UIImage imageWithData:data];
photoEditor.image = image;

// Process Stickers
Expand Down

0 comments on commit e1f3531

Please sign in to comment.