Reputation: 1104
From AddressBook's API ABPersonCopyImageData
I can get a CFDateRef which is toll-free bridge to NSData. And I want to write this data to file, but what file extension should I use ?
.jpeg or .png?
The documentation doesn't mention what the data is.Is there any way to know?
Upvotes: 3
Views: 222
Reputation: 48
NSData *imgData = (__bridge NSData *)ABPersonCopyImageData(person);
UIImage *img = [UIImage imageWithData:imgData];
if (!img) {
img = [UIImage imageNamed:@"noImage.png"];
}
Upvotes: 1