FROM : Rainer Brockerhoff
DATE : Sun Nov 11 18:11:39 2007
At 08:38 -0800 11/11/2007, <email_removed> wrote:
>From: JanakiRam <<email_removed>>
>References: <<email_removed>>
> <<email_removed>>
>In-Reply-To: <<email_removed>>
>Date: Sun, 11 Nov 2007 21:39:54 +0530
>Message-ID: <<email_removed>>
>
>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_removed>>
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
DATE : Sun Nov 11 18:11:39 2007
At 08:38 -0800 11/11/2007, <email_removed> wrote:
>From: JanakiRam <<email_removed>>
>References: <<email_removed>>
> <<email_removed>>
>In-Reply-To: <<email_removed>>
>Date: Sun, 11 Nov 2007 21:39:54 +0530
>Message-ID: <<email_removed>>
>
>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_removed>>
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
| Related mails | Author | Date |
|---|---|---|
| JanakiRam | Nov 11, 16:23 | |
| glenn andreas | Nov 11, 16:47 | |
| JanakiRam | Nov 11, 17:09 | |
| Rainer Brockerhoff | Nov 11, 18:11 | |
| Mike Abdullah | Nov 11, 18:29 |






Cocoa mail archive

