Reputation: 21
I encounter the following problem when using UIImageWriteToSavedPhotoAlbum and the EXIF data is lost.
UIImage * image = [[UIImage alloc] initWithData:recevedData];
UIImageWriteToSavedPhotosAlbum (image, self, @selector(myselector:), nil);
receivedData
is a complete JPG file received remotely. The JPG file has all the Exif information inside. However after using UIImageWriteToSavedPhotosAlbum
to save to photo albums I realize there is no more EXIF stored. Is this because of UIImageWriteToSavedPhotosAlbum
or because of UIImage
stripping of all the EXIF?
Upvotes: 1
Views: 1480
Reputation:
UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:didFinishSavingWithError:contextInfo:) , nil);
- (void) image:(UIImage *) image didFinishSavingWithError:(NSError *) error contextInfo:(void *) contextInfo {
if ([image isEqual:image]) {
if (error) {
// Handle the error...
}else {
// saved succesfully
}
}else if (image == nil) {
// no image was provided
}
}
Apple documentation recommends above format for the selector. It may be not solve your problem, but you will know whats happening.
Upvotes: 0