Re: File Icon
Re: File Icon
- Subject: Re: File Icon
- From: Rainer Brockerhoff <email@hidden>
- Date: Tue, 6 Nov 2001 11:36:53 -0200
Date: Tue, 6 Nov 2001 00:53:36 -0500
From: Joshua Clements <email@hidden>
Thanks Finlay, for the pointer to NSWorkspace.
I've got that returning me an icon but it doesn't look
so hot at 16x16. I'm assuming that NSWorkspace is
returning me the 32x32 icon and the NSImageCell is
scaling it down to 16x16. Is there a way to get load the 16x16 icon?
NSWorkspace returns an NSImage containing all representations from
the file's icon - from 128x128 all the way down to 16x16.
Unfortunately scaling this to 16x16 doesn't apparently select the
16x16 representation, it just scales one of the larger
representations down - that's what the dock does, apparently.
So the guaranteed way seems to be to pick out the 16x16
representation out (if it exists) and redraw it into a new image.
--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"Originality is the art of concealing your sources."
http://www.brockerhoff.net/ (updated Oct. 2001)