• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: File Icon
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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)


  • Prev by Date: Re: Authorization.h
  • Next by Date: Re: Animated NSSliders: the code.
  • Previous by thread: Re: File Icon
  • Next by thread: Application behaving strangely after displaying a sheet
  • Index(es):
    • Date
    • Thread