Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Image Preview




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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

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



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.