Search code examples
macoscocoafinder

Generate custom Finder thumbnails for some file types


I'd like to be able to generate my own thumbnails for some image files with custom extensions (say, a .canon file that is really a TIFF), so that Finder would use them.

I don't want to change the file contents (nor am I interested in the embedded tiff thumbnail).

Creating the thumbnail from the file's contents would be easy, the tricky part is integration. Does anyone know if it's possible?

The custom extensions won't be associated to any/other app.

I've done a lot of iOS development but know very little about OS X components.

If it's not possible to use Finder at all, is it at least possible to store the thumbnails in resource forks and have them used by, say, a custom filesystem browser?


Solution

  • File thumbnails, as well as full-size previews (which are displayed when you tap the space bar), can be generated dynamically by Quick Look plugins for any file type that they're registered for. The thumbnails do not need to be stored in the file, although you can certainly use pregenerated thumbnails if they're already in there.

    For more information on Quick Look, please refer to Apple's Quick Look Programming Guide.