Skip to content

Commit

Permalink
Merge pull request Telerik-Verified-Plugins#1 from sereysethy/base64-…
Browse files Browse the repository at this point in the history
…no-line-ending

Remove line ending for base64 encoding on iOS
  • Loading branch information
sereysethy authored Dec 20, 2016
2 parents efed3ad + e14a76b commit 19450d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ios/SOSPicker.m
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ - (void)assetsPickerController:(GMImagePickerController *)picker didFinishPickin
// no scaling required
if (self.outputType == BASE64_STRING){
UIImage* image = [UIImage imageNamed:item.image_fullsize];
[result_all addObject:[UIImageJPEGRepresentation(image, self.quality/100.0f) base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength]];
[result_all addObject:[UIImageJPEGRepresentation(image, self.quality/100.0f) base64EncodedStringWithOptions:0]];
} else {
if (self.quality == 100) {
// no scaling, no downsampling, this is the fastest option
Expand Down Expand Up @@ -215,7 +215,7 @@ - (void)assetsPickerController:(GMImagePickerController *)picker didFinishPickin
break;
} else {
if(self.outputType == BASE64_STRING){
[result_all addObject:[data base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength]];
[result_all addObject:[data base64EncodedStringWithOptions:0]];
} else {
[result_all addObject:[[NSURL fileURLWithPath:filePath] absoluteString]];
}
Expand Down

0 comments on commit 19450d8

Please sign in to comment.