1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. REMINDER

    Any content, information, or advice found on social media platforms and the wider Internet, including forums such as AP, should NOT be acted upon unless checked against a reliable, authoritative source, and re-checked, particularly where personal health is at stake. Seek professional advice/confirmation before acting on such at all times.

Can I save a cropped .NEF file from Nikon Capture NX-D?

Discussion in 'Digital Image Editing & Printing' started by ChrisNewman, Mar 28, 2020.

  1. ChrisNewman

    ChrisNewman Well-Known Member

    Hi,

    I’ve just downloaded the free version of Aurora HDR 2018 offered through AP. Unlike the free HDR programs I tried several years ago, it genuinely does a better job of bringing out shadow detail from combined light and dark images than I can get by lightening the shadows of the dark image! Now I want to process some very high-contrast photos I took hand-held. But Aurora HDR 2018 fails to align the shots. This is understandable, given that I lowered the camera after each bracketed set of 3 shots, reduced the median exposure compensation, then raised the camera again for another batch of 3, finishing with 9 shots from 0EV to -4.0EV. (But it’s irritating that Aurora HDR 2018 doesn’t report that it’s failed to align them.)

    I’m hoping that if I crop some of the .NEF files in Nikon Capture NX-D, so that their fields of view match closely, Aurora HDR 2018 will then be able to align them precisely and produce a clean image. (The shots were all taken from much the same spot, with the same focal length at the telephoto end of the mid-range zoom.) I don’t want to lose image quality by saving JPEGs, and the alternative of 16-bit TIFF generates huge files. But I can’t see a way to save the cropped versions as new .NEF files. Is this possible?

    With thanks,
    Chris
     
  2. spinno

    spinno Well-Known Member

    NEF files-are they raw files, if so then you can't create raw files in this way
    but I may be wrong
     
  3. PeteRob

    PeteRob Well-Known Member

    Generally no editing changes a raw file. The edit instructions are saved separately to the file. This is why you can revisit and reverse/alter a crop.
     
  4. ChrisNewman

    ChrisNewman Well-Known Member

    Yes, .NEF are Nikon’s raw files, but that’s no reason in principle why a program shouldn’t be able to produce a new, smaller raw file.

    Chris
     
  5. ChrisNewman

    ChrisNewman Well-Known Member

    I know the usual principle with raw files is to make a record of changes without altering the content. But there’s no reason in principle why the content shouldn’t be output under a different filename in the .NEF format. Before posting I made a search, and came across someone complaining that he couldn’t save files in the .NEF format from Nikon’s old paid-for Capture NX or NX2. The response was that there was a facility to save them, although that might have resulted from confusion between saving a new file and saving the editing changes to the original file.

    Chris
     
  6. PeteRob

    PeteRob Well-Known Member

    I don’t know the Nikon software but generally you’d “save” the edit instructions, and you can have many different sets for a single raw image. Lightroom calls them virtual copies. You would export to make a separate image file but always in a different format. Possibly DNG is an optional format. If so you probably have to make all the files the same pixel size for the merge to work.
     
  7. ChrisNewman

    ChrisNewman Well-Known Member

    I know the usual procedure is for all edits to raw files to be stored, for the good reason of keeping them reversible. But I’m struggling to get Aurora to align my images, without being sure why it hasn’t so far, so I want to avoid the additional uncertainty of whether it’s working on my intended crop of the image, or ignoring stored editing instructions and looking at the whole original NEF raw file.

    Nikon’s Capture NX-D can be set to show the size of the crop I’m making. These shots were taken with my D90, at 2848 × 4288 pixels. Initially I’m trying to get matching crops from different exposures at 2400 × 3600 pixels, but if I can make that work, I might try a less severe crop, with additional files include in the HDR.

    Capture NX-D doesn’t appear to offer a “Save” option. “Convert Files” offers JPEG, TIFF 16bit or TIFF 8-bit (I guess the reason DNG isn’t included is because it’s an Adobe format). I don’t find the instructions provided for Capture NX-D very helpful. I’m hoping that someone who’s familiar with it may know a way of outputting fresh, reduced-size NEF raw files, but I’m not expecting that - it would be a nice surprise to find it’s possible.


    Chris
     
  8. PeteRob

    PeteRob Well-Known Member

    None of the raw processors do, the "save" is usually dynamic, you don't see it happen. I'm used to the term "export" - "convert files" must be the nikon equivalent jargon.
     
  9. EightBitTony

    EightBitTony Well-Known Member

    There's no image in a RAW file (other than the JPG preview), and hence, nothing to crop. It's a collection of sensor data.

    There's no way to output a fresh RAW file.

    Even if you use the in-camera aspect ratio features for example, it still outputs the full sensor data in the RAW file and only the JPG preview shows the aspect ratio crop.
     
  10. ChrisNewman

    ChrisNewman Well-Known Member

    Thanks for that. Are you referring specifically to Capture NX-D when you say “There's no way to output a fresh RAW file.”? Obviously it would be possible for a computer with appropriate software to recalculate a cropped version of the NEF raw file from the data in the original raw file, but I suspect Capture NX-D lacks such algorithms, or alternatively the ability to save the resulting information as a new file.

    Chris
     
  11. PeteRob

    PeteRob Well-Known Member

    No. As Tony said the RAW file isn't an image. It only becomes an image when displayed through a raw processor, then when you are done playing with it you can save what is left into an image format. In the raw file each pixel only has brightness information. The raw processor turns this into 3 values of colour channel brightness taking account of the colour filter in front of the pixel and its surrounding pixels, then interpolating. If you wanted to remove some pixels then put it all back into the raw format you'd have to rewrite the demosaicing process and effectively define a new camera type.

    I did think that I'd read somewhere that jpgs and tiffs could be converted to DNG format which is a camera model independent "raw" format of Adobe but I just tried with Adobe DNG converter and it doesn't work - just says no raw files found.
     
    EightBitTony likes this.
  12. EightBitTony

    EightBitTony Well-Known Member

    No, I don't think it is possible. The sensor data is specific to the sensor, the RAW file describes what sensor is present, and then RAW processors use the two things to work out how to process the file. Along with a bunch of other stuff like black level, white level, etc. I don't think you can say 'only account for 2/3rds of the sensor data in this area' and actually end up with a valid RAW file. The RAW file is a combination of multiple types of data which make up the output from the sensor and information about the state of the camera. There's nothing to crop.

    If I'm wrong, someone's already written software to 'crop' RAW files and you'll find it on the web.
     
  13. ChrisNewman

    ChrisNewman Well-Known Member

    Thanks for looking into whether TIFFs could be easily converted to DNG format for me.

    My D800 has a choice of two different RAW file sizes, depending in whether an APS-C crop is applied or not. I admit I don’t know how this is treated when demosaicing, etc, but I would have thought it would be easier to apply standard edge conditions, etc, than to define two different camera types to be stored by all general RAW file conversion programs.

    However, RAW files vary between camera brands. So while I’m not convinced that it would be difficult for Nikon to include a RAW cropping procedure in their own Capture NX-D, written for their .NEF RAW files, it might be a major challenge, probably requiring proprietary information, for others to attempt to write procedures to cover a range of brands.


    Chris
     
  14. EightBitTony

    EightBitTony Well-Known Member

    If you're referring to an sRAW (or Small NEF, or Small RAW or RAW-S) it's a processed image, wrapped in a RAW container.

    i.e. the camera has taken the actual sensor data, processed it and created a hybrid image. It's not a RAW file, as such. So yes, you could have some software process a RAW file and crop it and then store that crop, but it's just doing what turning it in to a JPG would do anyway. Importantly, it's not a crop, it's a downsize of the full image.,

    I don't own a Nikon, so it may be a different RAW format you're referring to.
     
  15. PeteRob

    PeteRob Well-Known Member

    I tried to figure out how it was implemented without much luck. Canon seem to downsample their Raw files to give their M-raw and S-raw options which must seek to preserve the spatial relationship of pixel values for demosaicing. There is some discussion that the different sized formats don't give quite the same colour rendition which could be an effect of differences in interpolation. I don't know how masking is implemented. Canon stores edit information inside the CR2 files which would include any crop/rotation information. Possibly, null values are stored for pixels outside the mask to reduce file size. I've never used anything other than full raw files. I suppose it is easy to test how it is stored - for example if a raw image shot with the camera using 16x9 mask is opened in LR is the whole image still there?
     
  16. ChrisNewman

    ChrisNewman Well-Known Member

    I’m pretty sure the D800 set to DX format produces normal RAW files generated for only the APS-C crop area of the sensor, which photo editors would then need to transorm into a proper image.

    The manual gives FX (36×24) Image Area file sizes for: NEF (RAW), Lossless compressed, 12-bit; NEF (RAW); Lossless compressed, 14-bit NEF (RAW), Compressed, 12-bit; NEF (RAW), Compressed, 14-bit; NEF (RAW), Uncompressed,12-bit and NEF (RAW), Uncompressed, 14-bit.

    It then gives proportionally smaller (about 44% of the size) file sizes for the same 6 types for DX (24×16) Image Area.


    Chris
     
  17. PeteRob

    PeteRob Well-Known Member

    That’s 4/9 which you’d expect so indeed they must have implemented a selective output from the sensor.
     
  18. GeoffR

    GeoffR Well-Known Member

    Nikon Capture NX2 can save a file with a .nef extension but, never having used that function, I have no idea whether if is in any way raw data. Some how I doubt it.
     
  19. Terrywoodenpic

    Terrywoodenpic Well-Known Member

    Trying to crop raw files is not your problem.
    Your technique for shooting your images is the heart of the matter.

    Cropping would not solve your problem anyway. When you lowered and raised your camera to produce additional exposure sets. You inevitably introduced parallax in to your images. This prevents your software from being able to line up the detail in the images, crop or not.

    I do not under stand why you would need to take 9 exposures anyway. In most cases three are sufficient.
    Some cameras enable you to bracket more than that and to expose them more than one stop apart. I do not know the limitations of your camera. However a solid tripod is certainly recommended for this type of work.
     
  20. ChrisNewman

    ChrisNewman Well-Known Member

    Thanks Geoff. I have Nikon‘s ViewNX 2 on our desktop PC, which runs Windows Vista, so can’t take ViewNX-i and Capture NX-D. (Preferring the desktop, I usually use it to download my shots from the memory card, check their exposure and sharpness and name them. But my current principal lens on my D800, the Nikkor 24-70 VR, is newer than ViewNX 2, so I get “These images can neither be displayed as a RAW image nor edited because the distortion control lens profiles used on them are not found.”) I’ve now tried, and although ViewNX 2 isn’t as helpful to use, or as capable, as Capture NX-D, it will save "cropped" .nef files. However, the “cropped” file is substantially larger than the original, so I assume it’s saving information about the crop I’ve selected, rather than truly saving a cropped version of the file.

    Anyway, I went on to ask my question on the DPReview forum; it was generally considered that there's no provision for saving cropped versions of RAW files, and it was also suggested that I could in any case expect better results from using Capture NX-D to apply Nikon’s understanding of its RAW files to generate 16-bit TIFFs, and then to load those rather than RAW files into Aurora’s HDR editor.


    Chris
     

Share This Page