On Thu, Jan 13, 2011 at 9:43 AM, aglee <ag...@mac.com> wrote:
> I'm requesting a QuickLook preview for an OmniGraffle file.  The size I'm
> asking for is 500x300.  The image I get back is much smaller, at 122x77,
> which looks terrible when I display it in my application.  When I use
> QuickLook to preview the same file in the Finder, it looks great.
>
> Why would I get such a small image back?
>
> Here's the code I'm using (courtesy of Matt Gemmell's handy extension on
> NSImage):
>
>     NSDictionary *dict =
> [NSDictionary dictionaryWithObject:[NSNumbernumberWithBool:icon]
>
>   forKey:(NSString*)kQLThumbnailOptionIconModeKey];
>     CGImageRef ref = QLThumbnailImageCreate(kCFAllocatorDefault,
>                                             (CFURLRef)fileURL,
>                                             CGSizeMake(size.width,
> size.height),
>                                             (CFDictionaryRef)dict);
>     NSLog(@"ref [%d, %d]", CGImageGetWidth(ref), CGImageGetHeight(ref));

Taking a while stab here: icon==YES?

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to