Nikon raw format NEF vs NRW

Started by kcochran, August 10, 2023, 07:07:25 PM

Previous topic - Next topic

kcochran

Exiftool 12.65 (as well as versions before) report (& warn) that raw files from a Nikon Z9 (.NEF) extension) are NRW format, not NEF. Is that a bug or a Feature?
Exiftool reports the NEF files from other cameras as NEF not NRW.
Is something amiss in internal file type determination or is this some kind of bug in the camera firmware?
So far my research indicates that the NRW format only applied/applies to their Coolpix models.
Thanks

StarGeek

Can you share a sample file?  Phil might already have a sample, but in case he doesn't, it would make it quicker for him to take a look.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

kcochran

Already made available from previous question on firmware oddities. DSLR files appear to be reported correctly, this appears to be rather longstanding, i.e. applicable to both current & previous camera firmware. I've been looking through the relevant hexdumps & so far not grasping how we might accurately determine a/the file format (a la the unix "file" command).

Phil Harvey

NRW is essentially the same as NEF.  One small change is (was?) the layout, with NRW storing a JPG-compressed thumbnail in IFD0.  If this exists in an NEF then it will be mis-identified, and I'll have to look for some other way to tell the difference.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Neal Krawetz

Honestly, I thought the only difference was the filename suffix.

Edit: References

https://libopenraw.freedesktop.org/formats/nef/
QuoteNRW is a variant, generated by some Coolpix like the P6000 and P7000. Some differences notable in the RAW data storage that is not "standard". The use of .nrw extension is probably to differentiate them since Nikon committed "support" in Windows (like a marketing gimmick).

http://fileformats.archiveteam.org/wiki/Nikon
QuoteThe NRW format is virtually identical to the NEF format, with a different compression and curves. There is no real reason to have changed the extension except, maybe, to discriminate entry level camera supported by the codec for Windows.


kcochran

Quote from: Phil Harvey on August 11, 2023, 08:50:16 PMNRW is essentially the same as NEF.  One small change is (was?) the layout, with NRW storing a JPG-compressed thumbnail in IFD0.  If this exists in an NEF then it will be mis-identified, and I'll have to look for some other way to tell the difference.

- Phil
NEF files do contain embedded JPEGs, although their characteristics are something I need to research (e.g. size/dimensions, compression). I have read that there might be more than one, say, a thumbnail and a large(r) image.

Phil Harvey

I won't have a chance to look into this for about a month because I'm going on vacation.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

I will patch ExifTool 12.68 (soon to be released) so it won't misidentify these.

Thanks for this report.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).