mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-01-18 19:22:51 +08:00
[CB-3757] camera.getPicture from photolib fails on iOS
-set data pointer properly when there's no controller metadata
This commit is contained in:
parent
a23de52370
commit
a9b79ebb44
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user