Possible Duplicate:
How should I store UIImages within my Core Data database?
I decided to save my images in Core Data as opposed to saving them on the disk. I looked at Apple's sample code called Locations. However, that code target iOS 4, I seen another Stack Overflow post that this changed in iOS 5.
I've read about the allows external storage, and i'm saving the image as binary data in my core data model.
The below code retrieves an image from core data, I found this online. However, I can not find any tutorials on how to save the image to core data in binary format, or any tutorials on working with core data and iOS 5 with images.
NSData *savedBinaryData = entity.smallImage;
self.smallImage.image = [UIImage imageWithData:savedBinaryData];