Re: Get Preferred Application Icon URL for a given file
Re: Get Preferred Application Icon URL for a given file
- Subject: Re: Get Preferred Application Icon URL for a given file
- From: Mike Abdullah <email@hidden>
- Date: Sun, 11 Nov 2007 17:29:13 +0000
On 11 Nov 2007, at 17:11, Rainer Brockerhoff wrote:
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.
Exactly, the NSImage does not necessarily have to exist on disk. You
could either create data: URLs for WebKit to handle or write out the
image to disk yourself in a temporary location.
--
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:
40mikeabdullah.net
This email sent to email@hidden
_______________________________________________
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