PDA

View Full Version : Reading Canon CR2 on MacOS



Shimaron
16th December 2013, 01:50
Hey all,

I'm developing an application that imports raw camera images (like CR2 from canon, NEF from Nikon etc.). I believe there's a million ways to do it - the one I picked for simplicity was to use dcraw (http://www.cybercom.net/~dcoffin/dcraw/) as an executable call. That works for my purpose, but it's kind of ugly.

I'd like to utilize MacOS' capabilities of importing raw camera images. I've seen that Qt5.2 (which I'm using) has mac functions that allows me to convert a CGImageRef to a QPixmap. That, I believe, is a big part of what I'm trying to achieve. However, I have no background in Mac programming (just C++ and Qt, no objective C) and cannot figure out how to read a raw camera file into a CGImage(Ref).

TLDR:
Input: Any raw camera image file (.CR2, .NEF, .CRW, ...)
Output: A QPixmap with said image.
Need: A source code that compiles on Mac OS 10.9, Qt5.2.

Thanks a lot for your help!

Best,

Shimaron