Skip to content

Commit

Permalink
fix orientation problem on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
HalahRaadSalih committed May 16, 2017
1 parent f3e414d commit 435cde3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ios/SOSPicker.m
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ - (void)elcImagePickerController:(ELCImagePickerController *)picker didFinishPic

UIImage* image = [UIImage imageWithCGImage:imgRef scale:1.0f orientation:orientation];
if (self.width == 0 && self.height == 0) {
data = UIImageJPEGRepresentation(image, self.quality/100.0f);
UIImage *scaledImage = [self imageByScalingNotCroppingForSize:image toSize:image.size];
data = UIImageJPEGRepresentation(scaledImage, self.quality/100.0f);
} else {
UIImage* scaledImage = [self imageByScalingNotCroppingForSize:image toSize:targetSize];
data = UIImageJPEGRepresentation(scaledImage, self.quality/100.0f);
Expand Down

0 comments on commit 435cde3

Please sign in to comment.