NSCoding does not preserve the full UIImage information for images loaded with imageNamed:
| Originator: | steipete | ||
| Number: | rdar://20256773 | Date Originated: | 23-Mar-2015 12:00 PM |
| Status: | Open | Resolved: | |
| Product: | iOS | Product Version: | 8.2 |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: Serializing an image using NSKeyedArchiver produces different results depending on how the image was loaded. - For images loaded with imageNamed: the image data is not serialized (which prohibits us from deserializing the image in full later on). - Images loaded with imageWithContentsOfFile: get completely preserved. Steps to Reproduce: Open the attached project and run it. Follow the onscreen instructions and compare the different displayed results. Expected Results: The image would be fully preserved even when loading it using imageNamed:. Actual Results: Images loaded with imageNamed: do not get fully serialized when using NSKeyedArchiver. Regression: Occurs on iOS 8.2. Also happens on iOS 7. Notes: Using imageWithContentsOfFile: works. Drawing images loaded with imageNamed: into a new bitmap context and obtaining a new image from it also works. This is a duplicate of rdar://20256585
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!