ADC Home > Reference Library > Technical Q&As > QuickTime > Compression & Decompression >

Creating Thumbnail PICTs

Q How can I display the thumbnail of the PICT instead of some generic icon when I create QuickTime PICT files? This would really help with distinguishing files when someone wanted to create a movie and had a lot of these PICTs around.

A Follow this procedure:

1. Get the thumbnail. You can use either the MakeThumbnailFromPicture or MakeThumbnailFromPictureFile routines as listed in the ImageCompression interface file. It will pass back the PicHandle for the thumbnail. To install into the Finder, you need icon resources (ICN#, ics#, icl8, ics8, icl4, ics4).

2. Make the thumbnail into a 'icsx' format to store it as a resource. (Please see MakeIcon on the Developer CD. It is not modified for pichandles so you may have to add a DrawPicture. Basically, you need to create a GWorld and create the appropriate 16- or 32-bit image.)

3. Add icons to resource. You can use the basic Resource Manager's WriteResource and AddResource calls to add the resource.

4. Set Finder bits: Stuff icon resources into the file itself with resource ID kCustomIconResource, and set the hasCustomIcon bit.

{ myCInfoPBRec.ioFlFndrInfo.fdFlags := BOR(myCInfoPBRec.ioFlFndrInfo.fdFlags, $0400) }.

[May 01 1995]


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.