How does ABPersonViewController work for processing photo data?
Through ABPersonViewController we can edit contact's photo. Then How can we access the photo info by other way? However, we got ABPerson's image data as the big original picture but not the clip photo data as the ABPersonViewControll开发者_StackOverflow中文版er show. Then what should we do? ABPersonCopyImageData, next?
+[UIImage imageWithData:]
To scale the image, something like
UIGraphicsBeginImageContextWithOptions(size, YES, 0);
[[UIImage imageWithData:data] drawInRect:(CGRect){{0,0},size}];
UIImage * scaledImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
(assuming size
is the number of "points", for iPhone 4 support)
精彩评论