• 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: Image Preview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Image Preview


  • Subject: Re: Image Preview
  • From: Peter Ammon <email@hidden>
  • Date: Wed, 14 Nov 2007 12:49:13 -0800


On Nov 14, 2007, at 12:33 PM, Lorenzo wrote:

Hi,
I scan a folder containing a lot of image files and I show a list of preview
of each image file contents. I read each image file with
[[NSImage alloc] initWithContentsOfFile:filePath];
Of course if the folder contains a lot of image files and/or the image files
are huge (GBs), this task takes a lot of time. So I ask, is a way to get
quickly a preview of the image file (if any already embedded into the image
file)? I link to SDK 10.4, not yet Leopard.

You want to use the functions in CGImageSource.h. Specifically, create a CGImageSource from an image file and then create a thumbnail from that image source. For most image types, this is much more efficient than decoding the entire file and scaling it down.


-Peter


_______________________________________________

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


References: 
 >Image Preview (From: Lorenzo <email@hidden>)

  • Prev by Date: Image Preview
  • Next by Date: Re: Adding subviews to a PDFView
  • Previous by thread: Image Preview
  • Next by thread: Toolbars under Leopard and IB 3
  • Index(es):
    • Date
    • Thread