acessing finder preview image in cocoa

Discussion in 'Mac Programming' started by hrishidev, Sep 25, 2008.

  1. macrumors regular

    Joined:
    Dec 3, 2007
    #1
    Hi
    My question can we access the preview image shown by finder in cocoa
    can we use it as NSImage object ????
    Are these preview images are stored somewhere (means in resource fork )
    can we set/edit this preview image
     
  2. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    You can use QLThumbnailImageCreate() to generate a thumbnail.
     
  3. macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #3
    http://forums.macrumors.com/showthread.php?t=538263

    That thread discussed a number of ways to tackle this. The OP in that thread eventually chose a domain-specific solution by using a thumbnail stored in the resource fork by adobe apps, but there are some links and discussions about the actual code that Finder uses to do this.

    QLThumbnailImageCreate is probably a better answer, but is 10.5 only. You didn't say what OSs you are targeting, so that may be OK.

    -Lee
     
  4. thread starter macrumors regular

    Joined:
    Dec 3, 2007
    #4
    The code at the end of thread seems to be useful .... i will try it and will come back here again ..... Thanks for replies guys
     

Share This Page