5
Bir dosya için hızlı bakış önizleme görüntüsü almanın bir yolu var mı?Get QuickLook önizleme görüntüsü resmi için
böyle bir şey arıyorum:
NSImage *image = [QuickLookPreviewer quickLookPreviewForFile:path];
Bir dosya için hızlı bakış önizleme görüntüsü almanın bir yolu var mı?Get QuickLook önizleme görüntüsü resmi için
böyle bir şey arıyorum:
NSImage *image = [QuickLookPreviewer quickLookPreviewForFile:path];
docs QLThumbnailRequest
bakınız: https://developer.apple.com/library/mac/#documentation/UserExperience/Reference/QLThumbnailRequest_Ref/Reference/reference.html
NSURL *path = aFileUrl;
NSDictionary *options = [NSDictionary dictionaryWithObject:[NSNumber numberWithBool:NO] forKey:(NSString *)kQLThumbnailOptionIconModeKey];
CGImageRef ref = QLThumbnailImageCreate(kCFAllocatorDefault, (CFURLRef)path, CGSizeMake(600, 800 /* Or whatever size you want */), (CFDictionaryRef)options);