Unable to save .icns file load via NSImage back out via CGImageDestination
| Originator: | dustin.norman | ||
| Number: | rdar://9719820 | Date Originated: | 04-Jul-2011 12:46 PM |
| Status: | Duplicate/9711622 | Resolved: | |
| Product: | Mac OS X | Product Version: | 10.6.8 |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: We have code that loads a .icns file into an NSImage and then writes that file out to a different location via CGImageDestination. Starting with 10.6.8 this no longer works. The file written by CGImageDestination is corrupt. Preview cannot open it. Attempting to open it again with NSImage results in an image with on internal representations. Additionally, the size of the file written is greater twice the size of the original file. Steps to Reproduce: 1) Load a .icns file with NSImage 2) Write the NSImage to disk using CGImageDestination 3) Notice that the image written is invalid and unopenable. Expected Results: Output image is effectively a copy of the input image. Actual Results: Output image is invalid/corrupt. Regression: This works in 10.6.7 and 10.7 previews. It stopped working in 10.6.8.
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!