You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by jc...@apache.org on 2020/10/28 17:53:25 UTC
[cordova-plugin-camera] branch master updated: fix(ios): correctly
append exif on iOS 14 (#685)
This is an automated email from the ASF dual-hosted git repository.
jcesarmobile pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-camera.git
The following commit(s) were added to refs/heads/master by this push:
new 2d1ee66 fix(ios): correctly append exif on iOS 14 (#685)
2d1ee66 is described below
commit 2d1ee66a2b6459540967d578cc534dc893546e12
Author: jcesarmobile <jc...@gmail.com>
AuthorDate: Wed Oct 28 18:47:10 2020 +0100
fix(ios): correctly append exif on iOS 14 (#685)
---
src/ios/CDVCamera.m | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/ios/CDVCamera.m b/src/ios/CDVCamera.m
index 0d6e7e5..2f2738b 100644
--- a/src/ios/CDVCamera.m
+++ b/src/ios/CDVCamera.m
@@ -651,13 +651,15 @@ static NSString* toBase64(NSData* data) {
CDVPluginResult* result = nil;
if (self.metadata) {
- CGImageSourceRef sourceImage = CGImageSourceCreateWithData((__bridge CFDataRef)self.data, NULL);
+ NSData* dataCopy = [self.data mutableCopy];
+ CGImageSourceRef sourceImage = CGImageSourceCreateWithData((__bridge CFDataRef)dataCopy, NULL);
CFStringRef sourceType = CGImageSourceGetType(sourceImage);
CGImageDestinationRef destinationImage = CGImageDestinationCreateWithData((__bridge CFMutableDataRef)self.data, sourceType, 1, NULL);
CGImageDestinationAddImageFromSource(destinationImage, sourceImage, 0, (__bridge CFDictionaryRef)self.metadata);
CGImageDestinationFinalize(destinationImage);
+ dataCopy = nil;
CFRelease(sourceImage);
CFRelease(destinationImage);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org