• 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
Core Graphics: Is it better to up-sample or down-sample images when drawing into a rect?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Graphics: Is it better to up-sample or down-sample images when drawing into a rect?


  • Subject: Core Graphics: Is it better to up-sample or down-sample images when drawing into a rect?
  • From: Jeff Szuhay <email@hidden>
  • Date: Wed, 24 Aug 2016 01:23:00 -0700

I’m using a bunch of layers to draw images to, compose them, and then draw into a viewRect
with

	CGContextDrawLayerInRect( viewContext, viewRect, myLayer);

Of course, I’m trying to pick the most reasonable size for my layers. I currently use 1024x1024
but could easily make them 512x512 or 768x768.

So my question is, “Is is more efficient to draw the layer into a smaller viewRect (down-sample)
or into a larger ViewRect (up-sample)?”

Or does it even matter?

I have an internal goal of using less than 1% of the CPU for my 1 second image drawing so it is
actually quite important for me to know.

TIA

Jeff Szuhay
a.k.a email@hidden <mailto: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: Core Graphics: Is it better to up-sample or down-sample images when drawing into a rect?
      • From: David Duncan <email@hidden>
  • Prev by Date: Re: NSAlert::runModal doesn't work on 10.6
  • Next by Date: Re: Core Graphics: Is it better to up-sample or down-sample images when drawing into a rect?
  • Previous by thread: Re: NSAlert::runModal doesn't work on 10.6
  • Next by thread: Re: Core Graphics: Is it better to up-sample or down-sample images when drawing into a rect?
  • Index(es):
    • Date
    • Thread