Re: Image Preview
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