Helpful Posts Helpful Posts:  0
Results 1 to 13 of 13

Thread: Nikon's NEF RAW file conversion to Jpeg

  1. #1

    Nikon's NEF RAW file conversion to Jpeg

    I want to extract jpeg image from Nikon's NEF RAW files, if its embedded in it, programmatically in SilverLight. Something similar to what QuickJPGfromCR2 tool does, for Canon RAW files CR2, http://www.gdzid.com/QJFC.cs ; or JPEGSnoop (written in C++) does.

    I have seen few URLs but couldnt get to the bottom of where the jpeg image would start in a NEF file, how big is that, how to gather other information about JPeg thumbnail and so on.

    I have looked at the tools like Exif, JPegSnoop, dcraw etc that does this. I don’t want a tool as I want to write .Net program to achieve what these tools does. I have googled into few sites http://lclevy.free.fr/nef/index.html, http://www.cybercom.net/~dcoffin/dcraw/ but couldn’t understand much.

  2. #2
    Shadowman's Avatar
    Join Date
    Dec 2009
    Location
    WNY
    Posts
    36,716
    Real Name
    John

    Re: Nikon's NEF RAW file conversion to Jpeg

    You have to convert the NEF file and I believe the default is TIFF format, from their you can save as a jpeg.

  3. #3
    herbert's Avatar
    Join Date
    Oct 2010
    Location
    Sussex, UK
    Posts
    471
    Real Name
    Alex

    Re: Nikon's NEF RAW file conversion to Jpeg

    Hi,

    Microsoft released codecs to work with raw files natively within the Explorer on Windows 7 to extract JPEG previews as thumbnails. I presume the same functionality could have made its way in to the .Net framework. However SilverLight always drags behind the standalone .Net in functionality so that is a long shot.

    I am assuming that you have a way to get the images to SilverLight. It runs in a sandbox with reduced file system functionality. So this means that you will not be able to run an external program to extract the JPEG.

    Have you tried posting on a few programmer forums such as StackOverflow? Some kind person may help you out there.

    Alex

  4. #4
    Black Pearl's Avatar
    Join Date
    Jan 2011
    Location
    Whitburn, Sunderland
    Posts
    2,422
    Real Name
    Robin

    Re: Nikon's NEF RAW file conversion to Jpeg

    Quote Originally Posted by Shadowman View Post
    You have to convert the NEF file and I believe the default is TIFF format, from their you can save as a jpeg.
    There is a full resolution jpeg within a NEF file though it is the "Basic" one as set by the camera so there is a quite a bit of compression. I used to have a bit of software called PreviewExtractor (seems to have disappeared from the net) that would pull them out. It was a handy way of quickly assessing images before Nikon released its NEF Codec for Windows as it would pull them out at a rate of three or four a second.

    Sorry I don't know anything about programming but the jpeg is there.

  5. #5

    Join Date
    Dec 2008
    Location
    New Zealand
    Posts
    17,660
    Real Name
    Have a guess :)

    Re: Nikon's NEF RAW file conversion to Jpeg

    Off memory, one of our members works for Microsoft in the "Silverlight Department" - perhaps she could help? Username is Agaace if you'd like to PM her.

  6. #6
    Shadowman's Avatar
    Join Date
    Dec 2009
    Location
    WNY
    Posts
    36,716
    Real Name
    John

    Re: Nikon's NEF RAW file conversion to Jpeg

    Quote Originally Posted by black pearl View Post
    There is a full resolution jpeg within a NEF file though it is the "Basic" one as set by the camera so there is a quite a bit of compression. I used to have a bit of software called PreviewExtractor (seems to have disappeared from the net) that would pull them out. It was a handy way of quickly assessing images before Nikon released its NEF Codec for Windows as it would pull them out at a rate of three or four a second.

    Sorry I don't know anything about programming but the jpeg is there.
    I usually set my camera to RAW +B (NEF +JPEG Basic). I only use the JPEG for viewing which files I plan to process and to get an idea how they look through the viewfinder (highlights, histogram, etc.). The JPEG Basic uses the highest compression setting and I rarely edit these images.

  7. #7
    darkslide's Avatar
    Join Date
    Jan 2012
    Location
    Auch, SW France
    Posts
    143
    Real Name
    Ian (the other one)

    Re: Nikon's NEF RAW file conversion to Jpeg

    Well I'm learning here today...I've never heard of a RAW file 'containing' a JPEG file (As usual I must have been sleeping at the back of the class in that lesson...)

    I've always understood that RAW files need to be converted. The image we see on the rear screen of the camera is just a quick and dirty conversion of the RAW file stored on the memory card. To me RAW files were simply sensor-output files which then had to be 'treated'.

    Confirmation anyone please?

  8. #8

    Join Date
    Dec 2008
    Location
    New Zealand
    Posts
    17,660
    Real Name
    Have a guess :)
    Quote Originally Posted by darkslide View Post
    I've always understood that RAW files need to be converted. The image we see on the rear screen of the camera is just a quick and dirty conversion of the RAW file stored on the memory card. To me RAW files were simply sensor-output files which then had to be 'treated'.

    Confirmation anyone please?
    A RAW file contains two images - the first is basically a "sensor dump", the second is the jpeg preview that the camera generates.

  9. #9
    darkslide's Avatar
    Join Date
    Jan 2012
    Location
    Auch, SW France
    Posts
    143
    Real Name
    Ian (the other one)

    Re: Nikon's NEF RAW file conversion to Jpeg

    Thanks for that clarification!

  10. #10

    Join Date
    Feb 2011
    Location
    retirement
    Posts
    331

    Re: Nikon's NEF RAW file conversion to Jpeg

    Quote Originally Posted by Colin Southern View Post
    A RAW file contains two images - the first is basically a "sensor dump", the second is the jpeg preview that the camera generates.
    Going off topic here but I wonder if that explains something I've noticed when I connect my Canon 400D to my XPMCE system. The camera is set to capture RAW+JPG so when I first connected it to the PC I expected the CF card to appear in Explorer as just another drive letter an on which I would see the folder structure ending is a list of .cr2 & .jpgs files. However, XP doesn't handle the CF card inside the camera that way. It does display a file listing BUT not of the a navigable folder structure ending in a list of .cr2 and .jpg files. What I see is just a listing of files as TWO .jpgs for every file and no .cr2 files. I can understand the 'missing' .cr2 files, XP has no native viewer for them and so the camera wizard can't cope with them. What I could understand (until now) was why I saw two versions of the .jpg file.

    Of course that all may be nonsense but I like the logic Thanks.

    Ken

  11. #11
    darkslide's Avatar
    Join Date
    Jan 2012
    Location
    Auch, SW France
    Posts
    143
    Real Name
    Ian (the other one)

    Re: Nikon's NEF RAW file conversion to Jpeg

    Seems perfectly reasonable to me - but then I was the only person in the Northern hemisphere who didn't know a RAW file contained a jpeg thumbnail...
    Last edited by darkslide; 21st April 2012 at 11:43 AM. Reason: Can't spell...

  12. #12

    Join Date
    Dec 2008
    Location
    New Zealand
    Posts
    17,660
    Real Name
    Have a guess :)

    Re: Nikon's NEF RAW file conversion to Jpeg

    Quote Originally Posted by stuck View Post
    Going off topic here but I wonder if that explains something I've noticed when I connect my Canon 400D to my XPMCE system. The camera is set to capture RAW+JPG so when I first connected it to the PC I expected the CF card to appear in Explorer as just another drive letter an on which I would see the folder structure ending is a list of .cr2 & .jpgs files. However, XP doesn't handle the CF card inside the camera that way. It does display a file listing BUT not of the a navigable folder structure ending in a list of .cr2 and .jpg files. What I see is just a listing of files as TWO .jpgs for every file and no .cr2 files. I can understand the 'missing' .cr2 files, XP has no native viewer for them and so the camera wizard can't cope with them. What I could understand (until now) was why I saw two versions of the .jpg file.
    I've seen this behaviour - but it was about 150 years ago, and I can't remember what the solution was. Probably just a codec needed for windows.

    If you convert your *.CR2 files to *.DNG you can specify the size of the embedded JPEG, if that helps.

  13. #13

    Join Date
    Feb 2011
    Location
    retirement
    Posts
    331

    Re: Nikon's NEF RAW file conversion to Jpeg

    Quote Originally Posted by Colin Southern View Post
    I've seen this behaviour - but it was about 150 years ago, and I can't remember what the solution was. Probably just a codec needed for windows.

    If you convert your *.CR2 files to *.DNG you can specify the size of the embedded JPEG, if that helps.
    Only 150 years ago? It's not a problem for me though. If I take the CF card out of the camera and put it into a card reader XP reads it 'properly' and I see the full folder structure and all the .cr2 and matching .jpgs.

    XP doesn't natively generate a thumbnail for the .cr2s but I have read that it is possible to get XP to display .cr2 files as thumbnails. However, I've never bothered to fix this issue. I find it quite handy really since it means I don't see double.

    Ken

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •