|
@@ -53,10 +53,18 @@
|
|
|
|
|
|
NSDate *date = [NSDate new];
|
|
|
|
|
|
+ if (![[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/%@", directoryUser, metadata.fileID]])
|
|
|
+ return;
|
|
|
+
|
|
|
NSURL *url = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/%@", directoryUser, metadata.fileID]];
|
|
|
-
|
|
|
+
|
|
|
CGImageSourceRef originalSource = CGImageSourceCreateWithURL((CFURLRef) url, NULL);
|
|
|
+ if (!originalSource)
|
|
|
+ return;
|
|
|
+
|
|
|
CFDictionaryRef imageProperties = CGImageSourceCopyPropertiesAtIndex(originalSource, 0, NULL);
|
|
|
+ if (!imageProperties)
|
|
|
+ return;
|
|
|
|
|
|
CFDictionaryRef tiff = CFDictionaryGetValue(imageProperties, kCGImagePropertyTIFFDictionary);
|
|
|
CFDictionaryRef gps = CFDictionaryGetValue(imageProperties, kCGImagePropertyGPSDictionary);
|