RAW vs. TIFF

Joined
Mar 27, 2007
Messages
2,344
Location
Columbia, MD
I always thought that a TIFF file was what Nikon called their RAW files. Though, I believe I'm wrong on that and that a TIFF file is something different.

Can someone tell me what a TIFF file is and how that differs from a RAW file?
 
Joined
Apr 3, 2006
Messages
5,614
Location
Texas
Can someone tell me what a TIFF file is and how that differs from a RAW file?


From the camera and user point of view, it's like this:

The NEF file contains the 12 bit RAW data, which is only usable in a RAW processor for the purpose to output JPG or TIF or DNG... something else that may be usable.

The camera TIF file is a 24 bit RGB image, a "finished" image, displayable and usable in virtually any image program that can use any image. It is not compressed by the camera, so file size is quite large, near 36 MB (because it is 24 bits and not compressed).

The TIF and JPG files are similar, in that both are 24 bits, and both are "finished", directly usable in about any image program. The main difference is that the the camera TIF image is not compressed, and the JPG image will have JPG compression, and will be maybe 1/5 file size.

Not a useful thing to know, but the NEF file is/was actually a TIF file, but containing customized data (NEF). TIF is customizable (by the software designer) to serve many purposes.
 
Joined
Apr 3, 2006
Messages
5,614
Location
Texas
Wayne,
---------------
24bit is sum of the colour-depth! ----> 3*8= 24!
that means 8bit for Red, Green, Blue each.

48bit in a 16bit-TIF as well, but this time it 16bit per channel.

Of course, and yes, 48 bit TIFF may be possible from scanners and Photoshop, but only 24 bit TIFF is available from the Nikon camera.
I assume the OP was asking about his camera.
The big practical difference is that NEF is RAW, and is only useable by a RAW processor program (which offers some advantages in processing), whereas TIF and JPG are finished files directly usable by any image program.

12/14 bit raw data in the NEF does mean, that 4 respectively 2 bit are not used and therefor are lost respectively wasted space because 12/14 bits can not be stored
I think you are speaking of 14 bits consuming 16 bits of file space. But Nikon packs the 12 bit RAW files more efficiently, into 12 bits.

File size from D700 page 423:

24 bit TIFF file (uncompressed) 35.9 MB
12 bit NEF uncompressed file size 18.8 MB (effectively half size)
14 bit NEF uncompressed file size 24.7 MB

There are other file overhead bytes of course, tags and headers and Exif, etc.

4256 x 2832 pixels is 12.08 million pixels.

Minimum size for just the data bits is:

x 12 bits is 12.08 * 12/8 = 18.2 million byes = 17.2 MB
x 24 bits is 12.08 * 24/8 = 36.24 million bytes = 34.56 MB
x 14 bits is 12.08 * 16/8 = 24.16 million bytes = 23.04 MB
 
Joined
Apr 3, 2006
Messages
5,614
Location
Texas
Wayne, have a look here:

http://www.cryptodendron.de/divers/NC/exif/Zeiss_85_bits.jpg

nef is 48bit colour-depth
You can store a nef in either 24bit/48bit-colour-depth with NX, COne, Preview, Phocus, ...

So the user can decide wether to store resulting Tiffs from nef as 8bit/16bit-tiff.

If the colour-depth would only be 24bit, the result ONLY would be an 8bit-tiff with your calculated size.
If the data only would be 8bit, it will never ever be possible to store a nef as a 16bit-tiff

(Some of the versions of PSE are limited to store nefs as 8bit-tif only, if I remember right)



I'm sorry Tom, I cannot say that I follow your point, or its pertinence to this. We seem to be having independent conversations. :smile:

NEF is certainly not 48 bit data.
NEF is not even RGB format.
NEF is 12 or 14 bits Bayer.

When opened in a RAW processing program, that 12 bit RAW Bayer data will be converted to become 48 bits RGB (12 bits of data in each channel's 16 bit word) to allow computer processing, such as gamma. And yes, then that program can output 24 or 48 bit RGB files (or 24 bit JPG files).

But the NEF file is not near 48 bits per pixel, and not near RGB, and if the Nikon camera outputs the TIF file, it will be 24 bits.

I know all that, and I think you do too. Yes, I do understand about three RGB channels, and about 8 or 16 bits.

However RAW NEF files are 12 or 14 bit Bayer, not 48 bits, and not RGB.
 
Joined
Jan 15, 2008
Messages
4,553
nef is 48bit colour-depth

No. NEF is un-demosaiced 12-bit or 14-bit data file.

So the user can decide wether to store resulting Tiffs from nef as 8bit/16bit-tiff.

If user demosaics the raw data with a raw converter, the result can be saved in any format.

The big difference between raw and tiff is the unbayerisation or demosaicing phase. Raw file contains only 12 or 14 bits per pixel, but a tiff usually 48 bits per pixel and thus consumes 4 times the storage space.


EDIT: Wayne beat me to it.
 
Joined
Aug 25, 2009
Messages
4,043
Location
Missouri
For normal humans...

Shoot RAW for the best processing abilities...
Save as tif during your workflow, as it can be saved an infinite number of times with no loss of data...
Save final image as jpeg...

That's about it really.
 
Joined
Jan 15, 2008
Messages
4,553
The difference between in-camera TIFF and NEF is that:

a) TIFF has white-balance and gamma curve baked in, as well as picture control settings

b) TIFF is a debayerised RGB image, no way to go back to original

c) TIFF is 1.5 times bigger than NEF but still contains much less information

d) NEF is un-debayerised monochrome image. Color information comes from the raw developer software when debayering, with the knowledge of the dye densities and color filter arrangements of the sensor in question.
 
Last edited by a moderator:
Joined
Jun 4, 2008
Messages
883
Location
St. Louis
Real Name
Mike
I'm in IT and this technical debate reminds me of a joke: "What is the difference between a car salesman and a computer salesman? The car salesman knows he's lying."

Thanks to Andrew for the human explanation. :biggrin:
 
Joined
Apr 3, 2006
Messages
5,614
Location
Texas
it makes you wonder why Nikon (and others) would build tiff into their camera's then, if it gives bigger but less useful files


That seems kinda the wrong way to look at it. TIF is simply how large the data is.

Any normal color image is 3 bytes RGB data per pixel, 24 bits per pixel. If a 12 megapixel image, then 36 million bytes. Like it or not, that is simply how large the RGB data is. It ought not be a surprise.

FWIW, before someone pipes in, 6 bytes per pixel (48 bit data) is possible in TIF, and there are reasons, but our monitors and printers are designed for 24 bit RGB data. Nikon cameras only output 24 bit TIF or JPG.

RAW is 12 bits, but only one color is sampled at each pixel. This is smaller file size than 24 bits per pixel, but it is not complete RGB data, and must still be interpolated to create RGB. RAW is what is useless, so to speak, as we have no tools to even show it. Its only purpose is to create 24 bit RGB JPG or TIF files, something we can use.

JPG files are indeed much smaller - commonly compressed to perhaps 1/10 of the actual data size, which is NOT good for quality. Same number of pixels, but liberties are taken about preserving the original colors. They are uncompressed back to 3 bytes per pixel when in computer memory, but the damage has been done. We don't get back out of JPG exactly what we wrote in.

TIF is universal format choice for commercial printing, no questions about quality. Both TIF and JPG are 3 bytes per pixel uncompressed, but mainly, TIF bypasses JPG compression. That is the why of it.

But yes, from the cameras point of view, RAW is the original data, and it better fits onto the limited size memory cards. But it is not directly usable.

We can output TIF from the RAW processor later. We do have more options and range if we do it later ourselves. Some people consider this to be extra work, preferring to accept what is given, without the concept of control. TIF from the camera is not common, because those with such concerns about quality would rather do it themselves later.
 
Joined
Jul 15, 2010
Messages
1,490
Location
atlanta
i have had to use TIFF lately saved from my RAW files when i have to submit my stock images to an online vendor that only accepts flat tiff files. they advised it was due to being a universal accepted printing format.
 
Joined
Apr 3, 2006
Messages
5,614
Location
Texas
Yes... unless you save it with Adobe's Save For Web option, when it is discarded. But menu File - Save As - JPG will retain it.
 
Joined
Jul 21, 2007
Messages
5,262
Location
NJ
I like it when old threads are zombiefied. I think that a lot of people don't realize what it is that a Bayer filter is and what it is doing.
Let's try to create some clarity on the difference between the raw image and the end result that we see on our screen.

It is important to remember that the sensor sites ("pixels") can only distinguish tonality and not frequency of light. Hit the sensor with a certain amount of energy and it will read out a certain discrete value. It doesn't matter if that energy is a few photons of high intensity (blue light) or a whole bunch of lower intensity (red light)--energy is energy.

Here is a bayer filter for a 2k (46x46 pixel) sensor:

p926810966.png
Subscribe to see EXIF info for this image (if available)


And here's the image we're trying to capture with it (after the image passed through our spotless low pass (anti aliassing) filter:

p540664292.png
Subscribe to see EXIF info for this image (if available)


The bayer filter reduces the light for each pixel to either the red, green or blue band. So now our image looks like this:

p1006860919.png
Subscribe to see EXIF info for this image (if available)


But remember, the sensor really doesn't care about colors, it only looks at energy levels on a single scale, like this:

p796498052.png
Subscribe to see EXIF info for this image (if available)


At this point it's worth noticing that we only get a single readout per pixel, like this:

p887599436.png
Subscribe to see EXIF info for this image (if available)


This (above) is what the raw file contains. Each of the RGB "pixels" contains a single gray-scale value. It's incorrect to see a mid-gray pixel value as RGB #777777 because there is no RGB, just grey values. At this point the sensor contains as much color information as Kodak T-MAX film, that is to say, none (yes, TMAX is more purplish than grey when developed but it doesn't contain information about the original color).

Now we run this data through our EXPEED, BIONZ or whatever fancy acronym processor in the camera, or through our beloved raw converter on the computer, and we get this:

p548807672.png
Subscribe to see EXIF info for this image (if available)


Obviously, this image contains much more information than the previous one - 3 times as much, to be precise. I will leave it to the reader to ponder over this (hint: "Claude Shannon") and the relevancy of pixel peeping at that point.
 
Joined
Jul 11, 2009
Messages
1,379
Location
WICHITA, KS
Is the EXIF data saved when converting a NEF to a JPG?

Really depends on how it is saved.....if it is just exported and saved as a jpg from Lightroom...yes......if the jpg is "Saved As".......yes.........if it is "saved for the web" ....no the exif is wiped.........that has been my experience.....
 
Links on this page may be to our affiliates. Sales through affiliate links may benefit this site.
Nikon Cafe is a fan site and not associated with Nikon Corporation.
Forum post reactions by Twemoji: https://github.com/twitter/twemoji
Forum GIFs powered by GIPHY: https://giphy.com/
Copyright © Amin Forums, LLC
Top Bottom