• 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: Get Preferred Application Icon URL for a given file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get Preferred Application Icon URL for a given file


  • Subject: Re: Get Preferred Application Icon URL for a given file
  • From: Rainer Brockerhoff <email@hidden>
  • Date: Sun, 11 Nov 2007 15:11:39 -0200

At 08:38 -0800 11/11/2007, email@hidden wrote:
>From: JanakiRam <email@hidden>
>References: <email@hidden>
>	<email@hidden>
>In-Reply-To: <email@hidden>
>Date: Sun, 11 Nov 2007 21:39:54 +0530
>Message-ID: <email@hidden>
>
>NSWorkSpace is some how getting the preferred application image/icon ,
>constructing the NSImage object.
>   Any idea's on how Apple guys did it ?

I believe internally they call GetIconRefFromFileInfo() and then pass the iconRef to the new -[NSImage initWithIconRef:] API.

The iconRef you get from GetIconRefFromFileInfo() may not correspond to a specific image file on disk. Besides what Glenn Andreas already mentioned in a previous reply, if the file has a Finder badge, or is an alias, you get a new composited image which doesn't exist anywhere.

I seem to recall that WebKit supports some new syntax for doing in-line images - meaning TIFF data (or whatever) specified inside the <img /> tag - so you may want to investigate that instead.

--
Rainer Brockerhoff  <email@hidden>
Belo Horizonte, Brazil
"In the affairs of others even fools are wise
 In their own business even sages err."
Weblog: http://www.brockerhoff.net/bb/viewtopic.php
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Get Preferred Application Icon URL for a given file
      • From: Mike Abdullah <email@hidden>
  • Prev by Date: Re: Removing Application-Created Items
  • Next by Date: Re: Get Preferred Application Icon URL for a given file
  • Previous by thread: Re: Get Preferred Application Icon URL for a given file
  • Next by thread: Re: Get Preferred Application Icon URL for a given file
  • Index(es):
    • Date
    • Thread