Skip to content

Commit

Permalink
- Fixed LoadImageAtPath returning images with wrong orientation on so…
Browse files Browse the repository at this point in the history
…me iPhones
  • Loading branch information
yasirkula committed Nov 2, 2019
1 parent f0b21fc commit 4be8ea3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Plugins/NativeCamera/iOS/NativeCamera.mm
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ + (char *)loadImageAtPath:(NSString *)path tempFilePath:(NSString *)tempFilePath
// Check if the image needs to be processed at all
NSArray *metadata = [self getImageMetadata:path];
int orientationInt = [metadata[2] intValue]; // 1: correct orientation, [1,8]: valid orientation range
if (( orientationInt <= 1 || orientationInt > 8 ) && [metadata[0] intValue] <= maximumSize && [metadata[1] intValue] <= maximumSize)
if (orientationInt == 1 && [metadata[0] intValue] <= maximumSize && [metadata[1] intValue] <= maximumSize)
return [self getCString:path];
}

Expand Down

0 comments on commit 4be8ea3

Please sign in to comment.