cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesj...@apache.org
Subject git commit: [CB-3757] camera.getPicture from photolib fails on iOS
Date Mon, 17 Jun 2013 21:49:55 GMT
Updated Branches:
  refs/heads/master a23de5237 -> a9b79ebb4


[CB-3757] camera.getPicture from photolib fails on iOS

-set data pointer properly when there's no controller metadata


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/commit/a9b79ebb
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/tree/a9b79ebb
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/diff/a9b79ebb

Branch: refs/heads/master
Commit: a9b79ebb445999530f06684aa34170d890b12d9a
Parents: a23de52
Author: James Jong <wjamesjong@gmail.com>
Authored: Mon Jun 17 17:48:15 2013 -0400
Committer: James Jong <wjamesjong@gmail.com>
Committed: Mon Jun 17 17:48:15 2013 -0400

----------------------------------------------------------------------
 src/ios/CDVCamera.m | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/a9b79ebb/src/ios/CDVCamera.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVCamera.m b/src/ios/CDVCamera.m
index 343d250..11662ed 100644
--- a/src/ios/CDVCamera.m
+++ b/src/ios/CDVCamera.m
@@ -307,10 +307,11 @@ static NSSet* org_apache_cordova_validArrowDirections;
             if (cameraPicker.encodingType == EncodingTypePNG) {
                 data = UIImagePNGRepresentation(scaledImage == nil ? image : scaledImage);
             } else {
-                self.data = UIImageJPEGRepresentation(scaledImage == nil ? image : scaledImage,
cameraPicker.quality / 100.0f);
+                data = UIImageJPEGRepresentation(scaledImage == nil ? image : scaledImage,
cameraPicker.quality / 100.0f);
 
                 NSDictionary *controllerMetadata = [info objectForKey:@"UIImagePickerControllerMediaMetadata"];
                 if (controllerMetadata) {
+                    self.data = data;
                     self.metadata = [[NSMutableDictionary alloc] init];
                     
                     NSMutableDictionary *EXIFDictionary = [[controllerMetadata objectForKey:(NSString
*)kCGImagePropertyExifDictionary]mutableCopy];


Mime
View raw message