• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Reasons why QL would fail to create thumbnail?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reasons why QL would fail to create thumbnail?


  • Subject: Re: Reasons why QL would fail to create thumbnail?
  • From: "email@hidden" <email@hidden>
  • Date: Thu, 27 Aug 2009 14:06:12 +0100


On 27 Aug 2009, at 12:34, Graham Cox wrote:

I'm using the following code to generate thumbnail images in one of my user interfaces. It works fine on my machine, and on all the ones I've tested, but a couple of users have reported that they don't see the thumbnails. One user experiencing this problem helped me to log some results which shows that the QLThumbnailImageCreate function is returning nil. The docs state that this will return nil if it can't read the file, but it's the exact same file on every system, loaded from my app's resources. So why would it fail in a few percent of cases, but mostly work? All affected users are running the latest system version.


CFURLRef url = CFURLCreateWithFileSystemPath( NULL, (CFStringRef) [self path], kCFURLPOSIXPathStyle, NO );


// logging the URL/path at this point shows that the correct path is being returned from [self path], a path to app internal resources

CGSize maxImageSize = CGSizeMake( 512, 512 );
NSDictionary* options = [NSDictionary dictionaryWithObjectsAndKeys: (id)kCFBooleanTrue, kQLThumbnailOptionIconModeKey, nil];

CGImageRef qli = QLThumbnailImageCreate( NULL, url, maxImageSize, (CFDictionaryRef)options );
CFRelease( url );

// on a very few systems, qli is nil here


Is there a possibility that QuickLook can somehow be turned off?

Not sure if this related. Sometimes I encounter the situation where the CoverFlow view in Finder stops providing previews - though I don't know if Finder uses QuickLook.
You could ask your users if this occurs in their case - it might narrow things down or throw up something else. Plus it's easy to check.


Any ideas?

--Graham


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden

Jonathan Mitchell

Developer
http://www.mugginsoft.com





_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >Reasons why QL would fail to create thumbnail? (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Reasons why QL would fail to create thumbnail?
  • Next by Date: Two controllers in a window, how do I get one to run a function in another?
  • Previous by thread: Re: Reasons why QL would fail to create thumbnail?
  • Next by thread: Re: Reasons why QL would fail to create thumbnail?
  • Index(es):
    • Date
    • Thread