NSWorkspace setIcon:NSImageNameFolder does not match other folders - alpha premultiplication bug?
| Originator: | tapted | ||
| Number: | rdar://16129816 | Date Originated: | 2014-02-11 |
| Status: | Open | Resolved: | |
| Product: | OS X SDK | Product Version: | 10.9 |
| Classification: | UI/Usability | Reproducible: | Always |
Summary:
The code:
[[NSWorkspace sharedWorkspace]
setIcon:[NSImage imageNamed:NSImageNameFolder]
forFile:@"/tmp/CocoaTestFolder"
options:0];
should result in a folder that matches other folders. However, it is "too dark". More specifically, it looks like an alpha-premultiplication bug - the partially transparent pixels around the edge look like they are getting premultiplied on load, and not un-premultiplied on save.
The result: it looks like there is a 1px black stroke around the icon when viewed in Finder.
Steps to Reproduce:
Run the above and observe.
Expected Results:
Icon in finder should match other folders.
Actual Results:
Icon does not match -- all representations are too dark around the edge.
Version:
System Version: OS X 10.9.1 (13B42)
$ xcodebuild -version
Xcode 5.0.1
Build version 5A2053
Notes:
Configuration:
Same occurs on Snow Leopard and Mavericks 10.9.1
$ otool -L minimal
minimal:
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 855.11.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1265.0.0)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1056.0.0)
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!