Can't Convert Image on Disk to NSData for Core Data
Can't Convert Image on Disk to NSData for Core Data
- Subject: Can't Convert Image on Disk to NSData for Core Data
- From: "Ian G. Gillespie" <email@hidden>
- Date: Mon, 29 Aug 2005 11:19:47 -0400
I can't convert an image on disk to a NSData object and store the
data in my Core Data model.
I have a Core Data application where one of the entities has a data
attribute which I use to store an image. In the UI, the image is
displayed in an image view with bindings and an data unarchiver
formatter. If I drag and drop an image into the image well,
everything works fine.
My model class also has a method to receive the URL to an image and I
am trying to create the data object from the incoming URL without any
luck. I have tried dataWithContentsOfURL, creating an image and
converting that to a data object, but I always get the same error
when I set the data object to my model: +[NSUnarchiver
unarchiveObjectWithData:]: extra data discarded
This seems like a pretty easy one, but I have searched and tried
several different combinations without any luck, so I am asking
members of the list.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden