开发者

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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜