• 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: Fast image loading + scrolling like iPhoto
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fast image loading + scrolling like iPhoto


  • Subject: Re: Fast image loading + scrolling like iPhoto
  • From: "M. Uli Kusterer" <email@hidden>
  • Date: Wed, 5 Jan 2005 18:33:50 +0100

At 10:16 Uhr -0600 05.01.2005, Ricky Sharp wrote:
I believe iPhoto uses OpenGL. During scrolling, output quality is decreased so that rendering time is greatly reduced. It's probably some trick with textures. Someone that actually has dealt with OpenGL (I never have myself) will know for sure.

Well, I don't know what iPhoto actually uses, but Quartz (or NSImage) will usually suffice for quickly drawing lists of images. The trick here (as always with drawing on MacOS X) is to make sure you only draw what you really need, and no more.


The second trick is to speed up actual loading of the image thumbnails through caching. You usually do that by pre-generating a very small preview at the size you will eventually need when an image is imported, and adding that to some sort of internal cache (cache file, SQLite database, ...) so you don't have to re-generate all these previews at runtime by loading the entire (possibly huge) image and then scaling it down.

Finally, for some image types (in particular JPEG and other progressively compressed image formats) you can often generate thumbnails faster than that by loading only part of the image. You will get a slightly blurry image, but usually that isn't noticeable once it's been scaled down. libEpeg is a good demonstration of this.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >Fast image loading + scrolling like iPhoto (From: Florian Soenens <email@hidden>)
 >Re: Fast image loading + scrolling like iPhoto (From: Ricky Sharp <email@hidden>)

  • Prev by Date: Re: Fast image loading + scrolling like iPhoto
  • Next by Date: NSRunLoop's limitDateForMode: returns nil
  • Previous by thread: Re: Fast image loading + scrolling like iPhoto
  • Next by thread: Re: Fast image loading + scrolling like iPhoto
  • Index(es):
    • Date
    • Thread