Skip to content

Commit

Permalink
Merge pull request #12 from ataylor32/ios-orientation
Browse files Browse the repository at this point in the history
Fixed iOS orientation
  • Loading branch information
rodrigograca31 authored Dec 4, 2019
2 parents 74cb99e + 583388a commit 3c9094a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ios/Canvas2ImagePlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ - (void)saveImageDataToLibrary:(CDVInvokedUrlCommand*)command
UIImage* image = [[[UIImage alloc] initWithData:imageData] autorelease];
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
// Request to save the image to camera roll
[library writeImageToSavedPhotosAlbum:[image CGImage] orientation:ALAssetOrientationRight /*(ALAssetOrientation)[image imageOrientation]*/ completionBlock:^(NSURL *assetURL, NSError *error){
[library writeImageToSavedPhotosAlbum:[image CGImage] orientation:ALAssetOrientationUp /*(ALAssetOrientation)[image imageOrientation]*/ completionBlock:^(NSURL *assetURL, NSError *error){
if (error) {
// Show error message...
NSLog(@"ERROR: %@",error);
Expand Down

0 comments on commit 3c9094a

Please sign in to comment.