• 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: Concurrent loading of images ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Concurrent loading of images ?


  • Subject: Re: Concurrent loading of images ?
  • From: James Crate via Cocoa-dev <email@hidden>
  • Date: Thu, 14 May 2020 11:35:46 -0400

On May 14, 2020, at 11:13 AM, Gabriel Zachmann via Cocoa-dev
<email@hidden> wrote:
>
> I thought i'm doing that with this code:
>
> -animateOneframe:
> // essentially, this gets called when the next image is to be displayed
> current_image_ = prefetched_image_;           // these are CGImageRef's
> dispatch_async( prefetch_queue_, ^{
>           [self loadNextImage];                // stores next image in
> prefetched_image_
> } );
> create a new CALayer,
> assign the current_image_ as content,
> create an animation for the layer,
> add the layer to the layer hierarchy

Since this stutter does not occur when cycling back through images that have
already been assigned to the layer, it’s possible that if the size of the
CGImageRef does not match the size of the CALayer, there may be some kind of
render occuring, especially if the image is being scaled to fit the layer.  Do
images much larger than the CALayer stutter more?

Also, if you’re resizing, you’ll want to use CIImage’s CILanczosScaleTransform
filter. Simply scaling a using a transform will give you a much blurrier image.

Jim Crate

_______________________________________________

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: Concurrent loading of images ?
      • From: Gabriel Zachmann via Cocoa-dev <email@hidden>
References: 
 >Concurrent loading of images ? (From: Gabriel Zachmann via Cocoa-dev <email@hidden>)
 >Re: Concurrent loading of images ? (From: Jens Alfke via Cocoa-dev <email@hidden>)
 >Re: Concurrent loading of images ? (From: Rob Petrovec via Cocoa-dev <email@hidden>)
 >Re: Concurrent loading of images ? (From: Gabriel Zachmann via Cocoa-dev <email@hidden>)
 >Re: Concurrent loading of images ? (From: Jens Alfke via Cocoa-dev <email@hidden>)
 >Re: Concurrent loading of images ? (From: Gabriel Zachmann via Cocoa-dev <email@hidden>)
 >Re: Concurrent loading of images ? (From: Alex Zavatone via Cocoa-dev <email@hidden>)
 >Re: Concurrent loading of images ? (From: Gabriel Zachmann via Cocoa-dev <email@hidden>)
 >Re: Concurrent loading of images ? (From: Alex Zavatone via Cocoa-dev <email@hidden>)
 >Re: Concurrent loading of images ? (From: Gabriel Zachmann via Cocoa-dev <email@hidden>)

  • Prev by Date: Re: Concurrent loading of images ?
  • Next by Date: Re: Xcode Build Location
  • Previous by thread: Re: Concurrent loading of images ?
  • Next by thread: Re: Concurrent loading of images ?
  • Index(es):
    • Date
    • Thread