• 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: Nicko van Someren <email@hidden>
  • Date: Wed, 5 Jan 2005 16:27:15 +0000


On 5 Jan 2005, at 16:09, Hasan Diwan wrote:

On Wed, 5 Jan 2005 16:05:56 +0100, Florian Soenens <email@hidden> wrote:
Does anyone know how to reproduce the fast image loading and scrolling
that iPhoto 4 has? I mean, displaying a low res version while scrolling
and resizing is one thing, but how does one implement this? What could
be the tricks behind this?
Any suggestions or experiences?

I don't know if this is how it's done, however, I do know that every digital camera emits certain tags, available at exif.org. One of these is a thumbnail. The thumbnail is a well-documented, standard part of EXIF, which is a standard followed by every digital camera I know of.

I think that there are two parts to the question; how do you do a quick and dirty low-res rendering of an image at all and also how to display one view while scrolling but another when the scrolling stops.


For the former I think that you may want to delve into the Quartz API to find out about directly rendering scaled images to the screen. Your program can have subclasses of NSImageView and NSImage that hold onto a low-res copy of the image in a form that Quartz can use directly and have it blit the scaled image directly to the screen if it thinks a fast draw is more important than a high quality draw.

For the second part I suspect that the best way to do this is going to be to subclass the NSScrollView to include a flag to indicate if the scroll view has moved recently; when the scroll bar is moved the flag is set and a timeout is reset to a second or so. When the timeout expires the flag is reset the visible objects are asked to redraw themselves in turn.

That's how I would do it anyway.

	Cheers,
		Nicko

_______________________________________________
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: Hasan Diwan <email@hidden>)

  • Prev by Date: Re: Fast image loading + scrolling like iPhoto
  • Next by Date: Re: Fast image loading + scrolling like iPhoto
  • Previous by thread: Re: Fast image loading + scrolling like iPhoto
  • Next by thread: Re: Fast image loading + scrolling like iPhoto
  • Index(es):
    • Date
    • Thread