NSImageView with icns file issue on Sonoma

I find NSImageView with icns file does not display color correctly on Sonoma.

As the test app shows, on the retina display, if the image view size is 18 or less, the problem happens. On non-retina display, the threshold is 42.

The correct colors should be red, yellow, and blue.

_imageView1.image = [[NSImage alloc] initWithContentsOfFile:@"/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"];
_imageView2.image = [[NSImage alloc] initWithContentsOfFile:@"/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Actions.icns"];
_imageView3.image = [[NSImage alloc] initWithContentsOfFile:@"/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/BookmarkIcon.icns"];

And if put the icns file into xcode project, then change code to

_imageView3.image = [NSImage imageNamed:@"BookmarkIcon"];

The problem still exists.

Wrong (image view size is small)

Correct (image view size is big enough)

Yes, there does seem to be something weird about icns handling in Sonoma. When I open that stop icon in Preview in Sonoma, the two smallest versions look blue in the thumbnail sidebar, but are red in the main view when selected.

Opening the same file in Preview on Ventura does not show this effect.

You should file a bug report with Feedback Assistant.

My guess is that the problem lies in the Image I/O Framework. I filed a bug report, FB13283189.

Agreed, I am seeing icns icons when displayed at 16 or less pixels (Retina anyway) do not draw in Sonoma.

I'll do a feedback as well - FB13352221

NSImageView with icns file issue on Sonoma
 
 
Q