You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ja...@apache.org on 2013/06/17 23:28:09 UTC
ios commit: [CB-3757] camera.getPicture from photolib fails on iOS
Updated Branches:
refs/heads/master fa55298b4 -> 7fdded84d
[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-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/7fdded84
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/7fdded84
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/7fdded84
Branch: refs/heads/master
Commit: 7fdded84d55ad3ffab999360afb4cf5f1ab7beac
Parents: fa55298
Author: James Jong <wj...@gmail.com>
Authored: Mon Jun 17 17:23:34 2013 -0400
Committer: James Jong <wj...@gmail.com>
Committed: Mon Jun 17 17:23:34 2013 -0400
----------------------------------------------------------------------
CordovaLib/Classes/CDVCamera.m | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/7fdded84/CordovaLib/Classes/CDVCamera.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVCamera.m b/CordovaLib/Classes/CDVCamera.m
index 1ee641c..d0a36dd 100644
--- a/CordovaLib/Classes/CDVCamera.m
+++ b/CordovaLib/Classes/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];