Re: QuickLook returning small image
Re: QuickLook returning small image
- Subject: Re: QuickLook returning small image
- From: Kyle Sluder <email@hidden>
- Date: Thu, 13 Jan 2011 10:06:43 -0800
On Thu, Jan 13, 2011 at 9:43 AM, aglee <email@hidden> 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 (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