Re: Getting thumbnail of document to appear?
Re: Getting thumbnail of document to appear?
- Subject: Re: Getting thumbnail of document to appear?
- From: "Dave Mattson" <email@hidden>
- Date: Thu, 7 Nov 2002 09:46:09 -0600
Yes I'm looking for the dynamic thumbnail, not a static Icon.
So it's a resource fork with an "icon" in it- there is no bundle getting
involved.
When I write out a "tiff" file a nice little thumbnail of the image appears
in the finder (when that is turned on by the user). I didn't write out the
thumbnail. So where did it come from? Did it get added at file write time
because something noted it was a tiff, or did it get appended later when the
finder saw it to be a tiff and associated it with it's file type owner to
provide the thumbnail.
When I write out in my native format of course no thumbnail. So is there a
service to provide, a method to override, or do I overtly append an NSImage
when I write the file.
There is a "-(void)setIcon:(NSImage *)icon" in NSFilewrapper. The
NSFilewrapper header documents this icon at lower precedence than the
application bundle supplied file icon. So it seems to be referring to the
static case (not that that might not work). So it doesn't sound right. It
would appear I need more information, like size to supply and which imageRep
maybe?
Sorry for the fishing expedition, I'm really trying to decide if this is
feasible, impossible, easy, or what before I dig into it and start
experimenting.
Thanks for the help.
Dave Mattson
email@hidden
ph: 608 635 7972
fax: 608 635 8971
cell: 608 444 5245
Dekorra Optics, LLC
W9386 Parkway Drive
Poynette, WI 53955
----- Original Message -----
From: "Chris Ridd" <email@hidden>
To: <email@hidden>
Sent: Thursday, November 07, 2002 3:08 AM
Subject: Re: Getting thumbnail of document to appear?
>
>
On 7/11/02 5:41 am, Alex Rice <email@hidden> wrote:
>
>
> On Wednesday, November 6, 2002, at 05:00 PM, Dave Mattson wrote:
>
>
>
>> Good evening:
>
>>
>
>> Does anyone know what I need to provide to get my application to
>
>> support and
>
>> present thumb nail images instead of just a standard file icon.
>
>> cocoa-OSX of
>
>> course. Where do those come from anyway?
>
>>
>
>> My question is just where I can find some documentation.
>
>>
>
>> I have gone back through all the documentation and can't seem to find
>
>> any
>
>> clues.
>
>>
>
>
>
> NSImage *theFileIcon = [[NSWorkspace sharedWorkspace] iconForFile:
>
> @"/path/to/file"];
>
> [myImageViewOutlet setImage: theFileIcon];
>
>
>
> Oh wait-- I just reread your message and I'm not sure this is what you
>
> are after. The method above will show the appropriate icon for whatever
>
> file type it is, but I don't think it "previews" the file. However some
>
> file types show a preview. I don't know maybe I shouldn't be answering
>
> :-)
>
>
I think Dave's talking about giving custom icons to each file. IIRC that's
>
done by adding a resource fork to the file and stuffing the icon in that.
>
>
Cheers,
>
>
Chris
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.