blob: 6890ad88142434b5d8e2d00e79e7cec2a2eaab89 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
NEF files are generated by Nikon cameras.
NRW 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).
# MIME type
image/x-nikon-nef
# Organisation
It is a TIFF file. close to TIFF/EP or DNG.
# Thumbnails
NEF files have a large JPEG preview. It is either in a subIF of the main IFD (type == thumbail) or for the older, in the [[MakerNote|MakerNote]] IFD.
# Compression
D1 files are not compressed.
D1x files are not compressed but have a weird shape: they have a pixel ratio of 0.5, ie 2 row for one.
Some files are packed (Compression = 32769). It is a standard packing with some padding: if col % 10 == 9, then an extra 8 bits must be skipped.
Compression (Compression = 34713) is a Huffman tree and a quantization table. The quantization tables are at 0x8c and 0x96 tag from the [[MakerNote|MakerNote]]. Strangely dcraw seems to only use the later as it override the value reading the tags in sequence. See nikon_compressed_load_raw().
[[http://www.majid.info/mylos/weblog/2004/05/02-1.html|http://www.majid.info/mylos/weblog/2004/05/02-1.html]] has a very insightful article about NEF decoding.
The D100 has a bug that tag uncompressed image as compressed, but not always. See nikon_is_compressed() in dcraw.c. It appear that most D100 will just use uncompressed (packed) as the compression _froze the camera for 20s_
NRW are not compressed, but the RAW data organisation is not standard. (TBD)
|