Re: Which format for image file resources in Cocoa application?
Re: Which format for image file resources in Cocoa application?
- Subject: Re: Which format for image file resources in Cocoa application?
- From: Ben Kazez <email@hidden>
- Date: Sun, 14 May 2006 23:23:30 -0500
On May 14, 2006, at 11:15 PM, John Stiles wrote:
Ben Kazez wrote:
On Sun, 14 May 2006 14:05:01 -0700, John Stiles wrote:
Christian Walther wrote:
John Stiles wrote:
I would assume that, much like icons, a framework should typically
prefer the smallest image that does not need to be scaled up.
e.g. with icons:
34x34 - 128x128 is scaled down
33x33 - 128x128 is scaled down
32x32 - use the 32x32 native version
31x31 - 32x32 is scaled down
30x30 - 32x32 is scaled down
Is this an observation of current behavior in Cocoa or a
wishlist? If
it's the former, I'd like to know how you achieved it. My
experience
with NSImage is that at 31x31, 128x128 is scaled down rather than
32x32, which makes for a suboptimal appearance.
It's actually an observation of the Finder's behavior. I do not know
what APIs the Finder uses internally to get this behavior.
Upon experimentation I find that the Dock does not work this way,
unfortunately.
This is actually the documented behavior:
"Although the Dock doesn’t use hints (it uses a sophisticated
algorithm on the 128 x 128 version), [smaller-sized] hints are
important for preserving crucial details in Finder icons."
<http://developer.apple.com/documentation/UserExperience/
Conceptual/OSXHIGuidelines/XHIGIcons/chapter_14_section_4.html>
Wow, that's really bizarre. "Hints are important for preserving
crucial details, but the Dock doesn't use them because it's scaling
algorithm is so super-sophisticated." I call BS. ;) The Dock should
respect the smaller sizes.
I believe the magnify effect (as well as live resizing of the Dock)
wouldn't look smooth if hints were used. A smaller hint could have
larger representations of objects within the icons, and then there
would be some jerkiness as the Dock jumped from one hint to another
during the magnify effect. Or am I wrong?
We should probably talk off-list, since this doesn't pertain much to
Cocoa (or to the original poster's question) anymore.
Ben
--
Ben Kazez
http://www.benkazez.com _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden