Skip to content
This repository has been archived by the owner on Aug 4, 2019. It is now read-only.

Commit

Permalink
ChatVC: sending jpeg insteam png image from camera
Browse files Browse the repository at this point in the history
  • Loading branch information
dvor committed Oct 15, 2014
1 parent cca664a commit e2eef16
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Antidote/ChatViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -542,14 +542,14 @@ - (void)imagePickerController:(UIImagePickerController *)picker didFinishPicking
NSString *fileName = [representation filename];

if (! fileName) {
fileName = @"photo.png";
fileName = @"photo.jpg";
}

UIImage *image = info[UIImagePickerControllerOriginalImage];
NSData *data = nil;

if ([fileUTI isEqualToString:(NSString *)kUTTypeJPEG]) {
data = UIImageJPEGRepresentation(image, 1.0);
if (! fileUTI || [fileUTI isEqualToString:(NSString *)kUTTypeJPEG]) {
data = UIImageJPEGRepresentation(image, 0.9);
}
else {
data = UIImagePNGRepresentation(image);
Expand Down

0 comments on commit e2eef16

Please sign in to comment.