mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-04-20 17:46:23 +08:00
CB-10873
- Avoid crash due to usage of uninitialized variable when writing geolocation data to image destination - Properly handle 'CameraUsesGeolocation' option by properly setting geolocation data in EXIF header in all cases This closes #205
This commit is contained in:
parent
def399fe51
commit
4202fff7ac
@ -359,6 +359,8 @@ static NSString* toBase64(NSData* data) {
|
||||
data = UIImageJPEGRepresentation(image, 1.0);
|
||||
} else {
|
||||
data = UIImageJPEGRepresentation(image, [options.quality floatValue] / 100.0f);
|
||||
}
|
||||
|
||||
if (options.usesGeolocation) {
|
||||
NSDictionary* controllerMetadata = [info objectForKey:@"UIImagePickerControllerMediaMetadata"];
|
||||
if (controllerMetadata) {
|
||||
@ -377,7 +379,6 @@ static NSString* toBase64(NSData* data) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user