ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: kcochran on August 10, 2023, 07:07:25 PM

Title: Nikon raw format NEF vs NRW
Post by: kcochran on August 10, 2023, 07:07:25 PM
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
Title: Re: Nikon raw format NEF vs NRW
Post by: StarGeek on August 11, 2023, 10:02:45 AM
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.
Title: Re: Nikon raw format NEF vs NRW
Post by: kcochran on August 11, 2023, 11:22:51 AM
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).
Title: Re: Nikon raw format NEF vs NRW
Post by: Phil Harvey on August 11, 2023, 08:50:16 PM
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
Title: Re: Nikon raw format NEF vs NRW
Post by: Neal Krawetz on August 11, 2023, 09:14:28 PM
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.

Title: Re: Nikon raw format NEF vs NRW
Post by: kcochran on August 13, 2023, 07:50:59 PM
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.
Title: Re: Nikon raw format NEF vs NRW
Post by: Phil Harvey on August 21, 2023, 08:38:18 AM
I won't have a chance to look into this for about a month because I'm going on vacation.

- Phil
Title: Re: Nikon raw format NEF vs NRW
Post by: Phil Harvey on October 16, 2023, 09:07:05 AM
I will patch ExifTool 12.68 (soon to be released) so it won't misidentify these.

Thanks for this report.

- Phil