I am trying to add a border around each contact photo. I have working code to create this bordered image and working code to set it as the contact image:
if (image) {
NSData *dataRef = UIImagePNGRepresentation(image);
CFDataRef cfdata = CFDataCreate(NULL, [dataRef bytes], [dataRef length]);
CFErrorRef error;
ret = ABPersonSetImageData(person, cfdata, &error);
if (ret) {
ret = ABAddressBookSave(addressBook, &error);
} else {
DebugLog(@"Could not write the image to the person: %@", [error description]);
}
CFRelease(cfdata);
}
The problem I am seeing is that while the bordered image shows up correctly in the thumbnail when viewing in the Contacts or Phone app, the full-screen image displayed on an incoming call is not.
I originally thought it was just zoomed in a little so I experimented with the border size. I confirmed that the border is not showing at all on the large shot. Am I missing something obvious?
EDIT 10/9/09 I have been in communications with Apple and this is indeed a bug in the Address Book framework. If you are reading this post, then I suggest you file a bug with Apple at to help expedite the fix.