NEF file types and sizes: bit depth and compression

Eduard

Super Mod
Staff member
Super Mod
Ran across an interesting link on Digital Camera World which had a brief description of why using higher bit depth while shooting RAW allows for wider range of tones in your images. I've linked to an illustration that shows the effect bit depth and compression have on Nikon raw files sizes for current bodies.

The article also points out that 8-bit JPEGs store 256 shades per channel, 12-bit NEFs capture 4096 shades per channel, and 14-bit NEFs capture 16,384 shades per channel.

NEF file types and sizes

NEF_file_types_explained.jpg
 

randyspann

Senior Member
That's pretty interesting! Judging by that chart one would think that a D5100 or "better" to get the 14-bit compressed would yield a better result. And begs the question: why does Nikon in the D3300 only use 12-bit depth? (the 3300 is the latest in the D3xxx line).
 

Eduard

Super Mod
Staff member
Super Mod
As a former D300 user, I like how it highlights another advantage of that awesome body: uncompressed NEFs. I would expect the rumored D9300 / D400 to also have this capability.
 

hark

Administrator
Staff member
Super Mod
As a former D300 user, I like how it highlights another advantage of that awesome body: uncompressed NEFs. I would expect the rumored D9300 / D400 to also have this capability.

I was thinking the same thing. There is a huge difference in file size for the uncompressed files.
 

PaulPosition

Senior Member
Can't see the advantage of uncompressed over lossless-compress ion. Well, unless they lie and it isn't truly lossless but with the vast amount of lossless algorithms like LZW used in .tiff or .psd, like RLE used in Targa (.tga), like zip and such...

Only reason I could see for using uncompressed would be the files fixed size so you know you have exactly 372 exposure left on that memory stick rather than knowing you have 372+ exposure left. (?!?)
 

Eduard

Super Mod
Staff member
Super Mod
I'll always take the largest file size I can get so I have more options during post and output.
 

PaulPosition

Senior Member
But lossless means exactly what it says. Loss. -less. No information loss. You uncompress it, you get the exact same bits in the exact same place, all that post-process potential is there, as strong as ever.

Lossless compression makes no compromise. If a scene is detailed enough that it can't find even one pattern to replicate, then - except in name - the image will be uncompressed and the ilesize will stay the same. But if half the frame is a burned sky of 100% white pixels you'll get a much smaller file for the same resulting digital negative.
 
Last edited:

Horoscope Fish

Senior Member
Screw it... I'm using the biggest, baddest most powerful files my camera can generate. If room becomes an issue, I'll buy a bigger card/hard drive and then complain about that. In the mean time, though, I'm going to wring out every last drop of in-camera performance I can even if the experts tell me there's no solid, practical difference. I didn't buy the best camera I could afford to start fussing over saving a couple megabytes of hard drive space.

...
 
Last edited:

Bill16

Senior Member
This uncompressed option I have might make the opening issue for post processing less of an issue. I'll try it for a while on one of my D300's, and I switched both of them to 14-bit raw files. I tend to agree with my buddy HF a lot lately! Lol ;)

Besides I've got plenty of cards and I'm not normally a high quantity shooter at a time anyway! Plus I even have a card coming for that possibility! Lol :D
 

Bill16

Senior Member
OK now that I've made this tough decision, I've got a question for the bigger brains here. Now having switched to 14-bit raw uncompressed, how does that help when converting it to 8-bit jpeg after post processing? What have I gained when I end up at 8-bit jpeg anyway? I know there is a logical answer that make this all make sense, but I'm not seeing it.

Can somebody kindly help enlighten me, pretty please? :)
 

J-see

Senior Member
The more bit, the wider the range of tones you can work with while processing. I do very basic adjustments in RAW, then convert to a 12bit Tiff for Photoshop. Those images are a whopping +100mb each.

Evidently when I save as JPG for web use, that comes at a price but for this medium, a tolerable one.
 

Bill16

Senior Member
I understand you can have much more to work with. But once you go and convert it to 8-bit jpeg, haven't you lost all you had extra? I mean, does any of that get through to that end product of a 8-bit jpeg photo file?
 

Bob Blaylock

Senior Member
OK now that I've made this tough decision, I've got a question for the bigger brains here. Now having switched to 14-bit raw uncompressed, how does that help when converting it to 8-bit jpeg after post processing? What have I gained when I end up at 8-bit jpeg anyway? I know there is a logical answer that make this all make sense, but I'm not seeing it.

Can somebody kindly help enlighten me, pretty please? :)

There's something that it had just occurred to me to add to this thread, before I read your posting, but I'll quote your posting because I think what I had to add relates somewhat to it; and perhaps gives me a better context in which to express the significance thereof

Assuming my understanding is correct, each pixel in a Raw/.NEF file contains only one color component—red, blue or green—according to its position in the Bayer filter pattern.

Each pixel on the camera's sensor is sensitive to only one color—red, blue, or green; and each pixel in the resulting Raw file records the brightness that the sensor saw for just that one color at that pixel.

By contrast, most color image formats, such as .JPG, contain, three different values in each pixel, for each of the three color components. Thus, an “8-bit” .JPG actually contains 24 bits for each pixel—8 bits for red, 8 bits for blue, 8 bits for green. So an “8-bit” .JPG file already is able to contain more information about the image than even a 14-bit .NEF file with the same number of pixels.


In converting from a Raw file to a format such as .JPG, part of the process involves, for each pixel, interpolating its value for the two colors that it does not cover, from the neighboring pixels. In the process, we go from every pixel having either 4096 or 16384 possible values, representing the brightness of only one of the three colors, to every pixel having 16,777,216 possible values, representing 256 brightness levels for each of three colors.
 

Eyelight

Senior Member
I understand you can have much more to work with. But once you go and convert it to 8-bit jpeg, haven't you lost all you had extra? I mean, does any of that get through to that end product of a 8-bit jpeg photo file?

More info means the paint is still wet and you can make more adjustments before it drys as an 8-bit file.
 

J-see

Senior Member
The information at your disposal to work with during post isn't necessarily all used in your finished product and as such no longer relevant. The difference with 8bit is that it wasn't there to begin with.

What it exactly ditches you'd have to ask someone better informed.
 

J-see

Senior Member
By contrast, most color image formats, such as .JPG, contain, three different values in each pixel, for each of the three color components. Thus, an “8-bit” .JPG actually contains 24 bits for each pixel—8 bits for red, 8 bits for blue, 8 bits for green. So an “8-bit” .JPG file already is able to contain more information about the image than even a 14-bit .NEF file with the same number of pixels.


In converting from a Raw file to a format such as .JPG, part of the process involves, for each pixel, interpolating its value for the two colors that it does not cover, from the neighboring pixels. In the process, we go from every pixel having either 4096 or 16384 possible values, representing the brightness of only one of the three colors, to every pixel having 16,777,216 possible values, representing 256 brightness levels for each of three colors.

As far as I know, JPG has 16,7 million values over the whole image while a 12bit image has 24 million or something.
Jpg has a 256 tonal variation for each pixel. 12bit some 4k, 14bit four times that.
 
Last edited:
Top