Re: Bit maps from raw camera files
Re: Bit maps from raw camera files
- Subject: Re: Bit maps from raw camera files
- From: Paul Sargent <email@hidden>
- Date: Mon, 7 Jul 2008 10:09:58 +0100
Remember that some raw files contain multiple resoltions (i.e. a
thumbnail and the main image), so you may not always want the first one.
On 6 Jul 2008, at 04:29, James Merkel wrote:
Will look into CGImageRef using ImageIO. However, I found that if I
use: imageRepsWithContentsOfFile: rather than
imageRepWithContentsOfFile: I can get a bit map from all raw files
that are supported by OS X. (At least for the raw files I have
checked so far). The method imageRepsWithContentsOfFile returns an
array of file reps, so the following works:
NSBitmapImageRep * imageBitMap = nil;
NSArray * repsArray;
repsArray = [NSBitmapImageRep imageRepsWithContentsOfFile:theFile];
if([repsArray lastObject] != nil) {
imageBitMap = [repsArray objectAtIndex:0];
}
Jim Merkel
On Sat, 05 Jul 2008 14:16:46 -0700 Chris Hanson wrote:
On Jul 5, 2008, at 2:00 PM, James Merkel wrote:
So the question is how to go about reliably getting a bit map
reliably form these camera raw files?
Try getting a CGImageRef using ImageIO.
On Jul 5, 2008, at 2:00 PM, James Merkel wrote:
I notice there are now about 120 Digital camera raw formats supported
by Mac OS X as of system 10.5.4.
I am trying to get a bit map from these camera files so I am using:
NSBitmapImageRep * imageBitMap = [NSBitmapImageRep
imageRepWithContentsOfFile:theFile]
For some raw files (Nikon NEF and Canon CR2) I get a bit map. But for
other files (Sony DSLR-A100 ARW file) I get a nil bit map.
On the other hand, I notice that the system does support the Sony raw
file in some way, since for example:
[[NSImage alloc] initWithContentsOfFile:theFile] does produce an
image.
So the question is how to go about reliably getting a bit map
reliably
form these camera raw files?
_______________________________________________
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
_______________________________________________
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