• 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: Bit maps from raw camera files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bit maps from raw camera files


  • Subject: Re: Bit maps from raw camera files
  • From: James Merkel <email@hidden>
  • Date: Mon, 07 Jul 2008 20:04:34 -0700

That's true. As a matter fact, I think all digital camera files have more than one image -- even the lowliest point and shoot camera has a main image and a thumbnail. However, I checked various camera files and found that imageRepsWithContentsOfFile: always seems to return just one image. So I assumed it is the main image. If it does return more than one image, I guess a more robust approach would be to look at the multiple bit maps and try to determine which one is the main image -- probably from the bit map size.

Jim Merkel



On Jul 7, 2008, at 2:09 AM, Paul Sargent wrote:

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


References: 
 >Re: Bit maps from raw camera files (From: James Merkel <email@hidden>)
 >Re: Bit maps from raw camera files (From: Paul Sargent <email@hidden>)

  • Prev by Date: Re: How to support dictionary service in a custom text view?
  • Next by Date: Re: Rerouting keyboard input
  • Previous by thread: Re: Bit maps from raw camera files
  • Next by thread: Guidelines for Cocoa frameworks supporting garbage collection?
  • Index(es):
    • Date
    • Thread