• 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: Best format and method for very fast CGImage resizing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best format and method for very fast CGImage resizing


  • Subject: Re: Best format and method for very fast CGImage resizing
  • From: David Duncan <email@hidden>
  • Date: Mon, 23 Apr 2007 13:18:16 -0700

On Apr 22, 2007, at 1:07 PM, Ken Tozier wrote:

As it stands now, I create the thumbnails as a CGImages inside a CGUtilCreateBitmapContext. Should I convert them to CIImages? NSImages? From there, what would be faster: An affine transform in the draw method? Or a CIImage transform?

The biggest win won't so much be from which method you use to store your thumbnails, as how you decide to store them. If you draw thumbnails as just a scaling down of the original image every time, then you will see fairly poor performance. If you have a maximum size for your thumbnails, preprocessing them into that maximum size from the originals will increase your performance greatly. If quality is a concern (and when isn't it!) then always make sure that you are scaling down rather than up.


From the pure CoreGraphics side of things, a CGImage or CGLayer would be the best way to store the thumbnails. CIImages don't store images so much as instructions for creating an image, so you will have to have your images in a CGImage or CGLayer before you could pass it to Core Image anyway (although Core Image may provide you with better scaling algorithms and better performance in general if it can work entirely on the video card).

--
David Duncan
Apple DTS Quartz and Printing
email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: Best format and method for very fast CGImage resizing [Solved]
      • From: Ken Tozier <email@hidden>
References: 
 >Best format and method for very fast CGImage resizing (From: Ken Tozier <email@hidden>)

  • Prev by Date: [ANN] Dejal Cocoa categories
  • Next by Date: Re: [PDFOutline destination] returns NULL
  • Previous by thread: Re: Best format and method for very fast CGImage resizing
  • Next by thread: Re: Best format and method for very fast CGImage resizing [Solved]
  • Index(es):
    • Date
    • Thread