• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Can't Convert Image on Disk to NSData for Core Data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Unarchive Data from URL (was Can't Convert Image...)
      • From: "Ian G. Gillespie" <email@hidden>
    • Re: Can't Convert Image on Disk to NSData for Core Data
      • From: Timothy Larkin <email@hidden>
  • Prev by Date: Re: Different System Fonts in Tiger, Panther, etc.
  • Next by Date: hyperlinktext cursor is not changing untill focus on textview
  • Previous by thread: Re: Setting the DPI of an NSBitmapImageRep
  • Next by thread: Re: Can't Convert Image on Disk to NSData for Core Data
  • Index(es):
    • Date
    • Thread