• 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: Is QuickLook implemented upon CGImage or CGImageSource under the hood?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is QuickLook implemented upon CGImage or CGImageSource under the hood?


  • Subject: Re: Is QuickLook implemented upon CGImage or CGImageSource under the hood?
  • From: Oleg Krupnov <email@hidden>
  • Date: Fri, 07 Sep 2012 15:26:07 +0300

Hi Mike,

Interesting, thanks. I wasn't aware that CGImageSource was the fastest
on the Mac. QuickLook sometimes seems so amazingly fast, even with
giant images, so that it made me think it uses some more advanced or
more low-level technology than CGImageSource which seems pretty old,
isn't it. My question was basically about this.

A corollary: if QuickLook is built on CGImageSource, then QuickLook
should support the same set of image formats as CGImageSource. Is this
the case? (Not counting third-party QL plugins)

I want to load an image as fast as possible and display it. But maybe
I gonna need to manipulate it a bit. What's the story change?

Thanks,


On Fri, Sep 7, 2012 at 3:12 PM, Mike Abdullah <email@hidden> wrote:
> I would be surprised if QuickLook is bothering to use anything lower-level.
> The raw truth of it is that CGImageSource is intended to be the fastest
> image-decoding library on the Mac. Quick Look should have a possible benefit
> in raw speed because it might have already cached a file's thumbnail.
>
> Of course, once you get into image manipulation, the story might change.
> What's your end goal here?
>
>
> On 7 Sep 2012, at 13:02, Oleg Krupnov <email@hidden> wrote:
>
> I guess I should have asked "Is QuickLook implemented upon
> CGImageSource/CGImage or lower-level libraries under the hood?" I
> mean, the question is not I CGImageSource vs. CGImage, but rather
> CGImageSource/CGImage vs. lower-level libraries like libjpeg etc.
>
> I tried to measure the performance of QuickLook vs CGImageSource but
> it's hard to make a clean experiment. I keep getting different figures
> each time. At superficial glance, it seems that they show nearly equal
> performance.
>
> But it would be really curious what libraries QuickLook uses under the hood.
>
> Thanks!
>
> On Fri, Sep 7, 2012 at 2:09 PM, Mike Abdullah <email@hidden>
> wrote:
>
> Your question in the subject makes little sense. CGImageSource is a means to
> create CGImages. Quick Look likely uses both therefore.
>
> Ultimately, you need to test different image loading routes to see which
> suits your needs.
>
> CGImageSourceCreateImageAtIndex
> Generates full-size images as fast as it can
>
> QLThumbnailImageCreate
> Generates thumbnails
> Might have the thumbnail already cached for speed
> Is going to spend a little time in cross-process communication
> Logs warnings if used on the main thread in my experience
> Can handle any file type, not just images
>
> CGImageSourceCreateThumbnailAtIndex
> Generates thumbnails
> Very fast
>
> On 7 Sep 2012, at 10:21, Oleg Krupnov <email@hidden> wrote:
>
> And what is the fastest method for image loading,
> QLThumbnailImageCreate or CGImageSourceCreateImageAtIndex?
>
> Thanks!
> _______________________________________________
>
> 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
>
>
>
_______________________________________________

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

  • Follow-Ups:
    • Re: Is QuickLook implemented upon CGImage or CGImageSource under the hood?
      • From: Mike Abdullah <email@hidden>
    • Re: Is QuickLook implemented upon CGImage or CGImageSource under the hood?
      • From: Dave Keck <email@hidden>
References: 
 >Is QuickLook implemented upon CGImage or CGImageSource under the hood? (From: Oleg Krupnov <email@hidden>)
 >Re: Is QuickLook implemented upon CGImage or CGImageSource under the hood? (From: Mike Abdullah <email@hidden>)
 >Re: Is QuickLook implemented upon CGImage or CGImageSource under the hood? (From: Oleg Krupnov <email@hidden>)
 >Re: Is QuickLook implemented upon CGImage or CGImageSource under the hood? (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Re: Is QuickLook implemented upon CGImage or CGImageSource under the hood?
  • Next by Date: Re: Is QuickLook implemented upon CGImage or CGImageSource under the hood?
  • Previous by thread: Re: Is QuickLook implemented upon CGImage or CGImageSource under the hood?
  • Next by thread: Re: Is QuickLook implemented upon CGImage or CGImageSource under the hood?
  • Index(es):
    • Date
    • Thread