ios - NSImage to NSData, then to UIImage -


I am creating a plast with my OSX app that contains some images, as a template for the iOS app. I am using this plist file:

  [NSKeyedArchiver archivedDataWithRootObject: self.someImage]   

But here I am going to file UIImage Can not convert it to NSImage (as it is only for OSX).

I get this error:

* Cancel the app due to non-exception 'NSInvalidUnarchiveOperationException', reason: '* - [ NSKeyedUnarchiver decodeObjectForKey:]: Can not decode the object of class (NSImage) '/ p>

Please suggest a way to overwrite me.

OS X: for nked archer Instead of using a NSImage to the NSData , NSImage method:

  NSData * ImageData = [Self estimate; TIFF rendering]; // file data to save the file   

iOS:
Read image data from file, then convert it to UIImage using UIImage feature maker Do: NSData * ImageData = ...; // UIImage file from the load image file * image = [UIImage imageWithData: imageData];

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -