FROM : Mike Abdullah
DATE : Sun Nov 11 18:29:13 2007
On 11 Nov 2007, at 17:11, Rainer Brockerhoff wrote:
> 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.
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_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
> _______________________________________________
>
> Cocoa-dev mailing list (<email_removed>)
>
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%
> 40mikeabdullah.net
>
> This email sent to <email_removed>
DATE : Sun Nov 11 18:29:13 2007
On 11 Nov 2007, at 17:11, Rainer Brockerhoff wrote:
> 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.
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_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
> _______________________________________________
>
> Cocoa-dev mailing list (<email_removed>)
>
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%
> 40mikeabdullah.net
>
> This email sent to <email_removed>
| 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

