locked
Camera RAW image processing in a Windows Store app

    Question

  • I want to create a Windows Store app in C# to process to camera RAW images. 

    In the Windows Store app, I can load the camera RAW image easily enough using a FileOpenPicker, but the image is put into a BitmapImage which has only 8 bits per channel. For my app to work, I have to have access to all the bits in each color channel. Most DSLR cameras capture images with 14 bits for each of the three color channels (red, green, and blue), and store their files in a file format that supports 16 bits per channel.

    I tried using SharpDX/DirectX and the Windows Imaging Component (WIC) to load the image, but it loaded the image into a bitmap format that is only 8 bits per channel as well (GetPixelFormat returns "{6fddc324-4e03-4bfe-b185-3d77768dc90c}", which is GUID_WICPixelFormat24bppBGR).

    I read here (http://social.msdn.microsoft.com/Forums/en-US/7825145b-be42-4898-8acb-0d6666248ed3/reading-high-color-ie-more-than-8bits-per-channel-values-from-a-raw-image) that Microsoft's codec will only read 8 bits per channel. Canon's codec can read 16 bits per channel, which is exactly what I want, but Canon's codec is only for 32-bit Windows, and I need to use 64-bit Windows.

    And I can use the Canon SDK, but that's only for desktop applications, not Windows Store applications. I'm not even sure P/Invoke will work to bring that into the Windows Store fold, though the little research I did isn't promising (It's a no go in WP7, for example).

    So is there a way to read camera RAW images at full color depth into a Windows Store application? Has anyone ever been successful at doing this? If you were tasked with accomplishing this feat, how would you go about making it happen?
    Thursday, June 19, 2014 4:45 AM

Answers

  • Not in-box and I'm not aware of any third party API for this. You'd pretty much need to write your own codec and handling layer.

    If you are side-loading then you could call the Canon SDK, but I doubt it is valid in a Windows Store app. Windows Store apps can pinhole and can call native code through runtime components, but the cooed code must be valid for Windows Store apps to be supported and to pass certification.

    --Rob

    Thursday, June 19, 2014 3:05 PM
    Owner