Re: QuickLook returning small image
Re: QuickLook returning small image
- Subject: Re: QuickLook returning small image
- From: Andy Lee <email@hidden>
- Date: Sat, 15 Jan 2011 20:20:03 -0500
Thanks, Julien. This is helpful.
On Jan 15, 2011, at 2:28 PM, Julien Jalon wrote:
> When requesting a thumbnail, it's up to the underlying plug-in to honor the requested size.
>
> If icon == NO, Quick Look will return the plug-in's image result as is.
>
> If icon == YES, Quick Look will force the requested size (because it adds icon decoration which should match the requested size) - so if you request a 512x512 icon, you should always get a 512x512 image.
When icon == YES, I do get back an image at the specific size I request. With some file types, like PDF and HTML, the larger image still looks reasonably good, but with OmniGraffle files I get a scaled-up version of the smaller image, with horrible pixelation.
> Many plug-in just use a low-resolution image stored in the file as a Quick Look thumbnail. It's totally acceptable but nowadays, "low-resolution" should be more toward 512x512 than 128x128.
Peeking into OmniGraffle's document format (optionally either a plist or a package), I see it does exactly that for both the thumbnail *and* the preview, and its low-resolution image is small. Also there is an option on a per-document basis to store no Quick Look info at all, in which case all you see is the document icon.
> Previews are more complex (generally slower to generate) and are meant to be displayed mainly in Quick Look panel but they also appear in Cover Flow, Column view, Info window
I haven't found a way to display Quick Look previews except using QLPreviewPanel. I assume there is currently no public API for displaying a preview in an arbitrary view?
I want to display nice thumbnails of OmniGraffle files (actually all file types, but these in particular), so I guess I can treat .graffle as a special case and extract the preview myself from the .graffle file. The preview is stored as a PDF; if it's a multi-page PDF, I'll grab the first page. If I find no preview, I'll fall back on my regular thumbnail logic, which will give me the document icon.
> and, starting with SnowLeopard, in live previews in Finder's icons.
I see the preview being used in Finder's Column mode, but in Icon mode it seems to be the thumbnail. I'll report this to Omni; the thumbnail really should be bigger in case I go into Icon mode and zoom the icons to full size. This is with the latest OmniGraffle Pro.
--Andy
_______________________________________________
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