RAW discussion

NEF, PEF, CR2 etc. are 'pure' raw files in that they come straight from the camera without any 'in camera' processing. The main complaint has been that there is no standard format for Raw, with each manufacturer having its own. DNG is an attempt by Adobe to produce a standard format usable by everyone.
I can't honestly comment on whether or not there is any deterioration in image quality, although the files are smaller. I did start converting my CR2 files to DNG for a while, to try and save disc space, but gave it up. Not only was it an extra step, as already mentioned, but it takes a lot longer to write Exif data to them, at least it does with my DAM programme.
 
I can't honestly comment on whether or not there is any deterioration in image quality, although the files are smaller.

The files being smaller does not mean there is any change in image quality. Plenty of lossless compression algorithms around.
 
NEF, PEF, CR2 etc. are 'pure' raw files in that they come straight from the camera without any 'in camera' processing. The main complaint has been that there is no standard format for Raw, with each manufacturer having its own. DNG is an attempt by Adobe to produce a standard format usable by everyone......

Thats my understanding too.

It will be ineteresting to see the outcome of this thread, I'd like to make sure I understand correctly.

It sure can get confusing! :bang:
 
The files being smaller does not mean there is any change in image quality. Plenty of lossless compression algorithms around.

You're quite right, there are plenty of lossless formats around, which is why I said what I did. ;)
 
DNG is a raw format, It simply Reorganizes the captured sensor data in a standardized way.
It neither gains nor loses any picture data, but it is more efficient space wise.
 
DNG is a raw format, It simply Reorganizes the captured sensor data in a standardized way.
It neither gains nor loses any picture data, but it is more efficient space wise.

That is my understanding too.

As someone said above it wiil be interesting to see how this thread develops.
 
Page 10:
DNG is an extension of the TIFF 6.0 format, and is compatible with the TIFF-EP standard. It is possible (but not required) for a DNG file to simultaneously comply with both the Digital Negative specification and the TIFF-EP standard.
 
Not being an IT computer whizz, I could well be wrong here, but I take "extension to the TIFF 6.0 format" to mean that its based on said format, and extended to creat the DNG format to get the required results for a standardised RAW file.

:shrug: All I know is that Samsung, Pentax and Adobe advertise DNG as a RAW format, and the DNG files from my GX10 behave exactly like a raw file is expected too.
 
Not being an IT computer whizz, I could well be wrong here, but I take "extension to the TIFF 6.0 format" to mean that its based on said format, and extended to creat the DNG format to get the required results for a standardised RAW file.
I agree. The text from the DNG specification does not say that a DNG is a TIFF, and it does not imply that a DNG is not lossless.

However it does introduce some uncertainty. The way I read this, if you come across a DNG file, then it could be:
(a) just a TIFF;
(b) just a RAW file;
(c) a RAW file and a TIFF (in the same way that Canon's CR2 contains an embedded JPG)
 
Interesting points there Stewart.

Although DNG in as far as my camera's manual refers, is a RAW file. If your shooting in Jpeg mode and press the RAW button, the files recorded are DNG. Set the camera to shoot RAW, its records DNG.

I thought I understood RAW files until today!! :bang:
 
Interesting points there Stewart.

Although DNG in as far as my camera's manual refers, is a RAW file. If your shooting in Jpeg mode and press the RAW button, the files recorded are DNG. Set the camera to shoot RAW, its records DNG.

I thought I understood RAW files until today!! :bang:

All cameras shoot in raw. It's how the camera then use that information that determines the IQ.

If you record the data in the cameras RAW file format you do all the work on your computer.

If you record the data in DNG you still have to do all the same work on your computer. But the images has already gone through at lest one process before you get to it.

Recording DNG, the data is not being recorded in its native format

I'm not saying DNG is bad. I just prefer to know I'm in control.
 
Now I'm more confused!

A quote from the GX10 manual
RAW data
Unedited image data output from the CCD. RAW data is data before being internally processed by the
camera. Settings like White balance, contrast, saturation and sharpness can be manipulated individually
on each file. In addition, RAW data is 12-bit data that contains 16 times the information of 8-bit JPEG
and TIFF data. Rich gradations are possible. Transfer RAW data to your computer and use the provided
software to create image data with different settings, such as JPEG or TIFF.

:shrug:
 
Now I'm more confused!

:shrug:
Why?

Look at it like this.

A RAW file from your camera could be a DNG. On Canons it will be a CRW or CR2, and on Nikons it will be a NEF - both of which are proprietary formats - but on Pentaxes and Samsungs it will be a DNG.

But a DNG need not be a RAW file. It could be a processed image in TIFF format. Or it might contain RAW data and a processed image in TIFF format. The DNG specification allows for it to be either/both.

So ... Not all RAWs are DNGs. And not all DNGs are RAWs. But some RAWs are DNGs, and some DNGs are RAWs.

I feel like drawing a Venn diagram here.
 
Why?

Look at it like this.

A RAW file from your camera could be a DNG. On Canons it will be a CRW or CR2, and on Nikons it will be a NEF - both of which are proprietary formats - but on Pentaxes and Samsungs it will be a DNG.

.

In a Pentax it can be PEF or DNG - user selectable.
 
... But the images has already gone through at lest one process before you get to it.

Recording DNG, the data is not being recorded in its native format.
Hi Dom,

What you're overlooking, in all your objections to TIFF is that TIFF is a container format, so that you can store anything you like in it - bitmap, jpeg, vector data, whatever. I see no reason why RAW shouldn't be stored in it.

AFAICT the only process that .DNG files direct from the GX-20 have gone through, is that they have had a "wrapper" placed around them, basically with EXIF data added and not much else.

I downloaded one of the sample .DMG files from the Photography Blog review of the GX-20 (I used the one of the purple flowers) and ran `tiffdump` on it:

Code:
$ tiffdump samsung_gx20_02.dng 
samsung_gx20_02.dng:
Magic: 0x4d4d <big-endian> Version: 0x2a
Directory 0: offset 8 (0x8) next 0 (0)
SubFileType (254) LONG (4) 1<1>
ImageWidth (256) LONG (4) 1<160>
ImageLength (257) LONG (4) 1<120>
BitsPerSample (258) SHORT (3) 3<8 8 8>
Compression (259) SHORT (3) 1<1>
Photometric (262) SHORT (3) 1<2>
Make (271) ASCII (2) 20<SAMSUNG TECHWIN Co.\0>
Model (272) ASCII (2) 20<SAMSUNG GX20       \0>
StripOffsets (273) LONG (4) 1<104232>
Orientation (274) SHORT (3) 1<1>
SamplesPerPixel (277) SHORT (3) 1<3>
RowsPerStrip (278) LONG (4) 1<120>
StripByteCounts (279) LONG (4) 1<57600>
XResolution (282) RATIONAL (5) 1<72>
YResolution (283) RATIONAL (5) 1<72>
PlanarConfig (284) SHORT (3) 1<1>
ResolutionUnit (296) SHORT (3) 1<2>
Software (305) ASCII (2) 24<GX20 Ver 1.00          \0>
DateTime (306) ASCII (2) 20<2008:07:09 11:23:01\0>
SubIFD (330) LONG (4) 2<103190 103568>
34665 (0x8769) LONG (4) 1<103914>
50706 (0xc612) BYTE (1) 4<00 00 0x1 0x1>
50707 (0xc613) BYTE (1) 4<00 00 0x1 0x1>
50708 (0xc614) ASCII (2) 13<SAMSUNG GX20\0>
50721 (0xc621) SRATIONAL (10) 9<-8.02406e+06 8.14361e+06 4.15949e+06 -2.67264e+06 5.37242e+06 -1.37421e+06 -2.09459e+06 6.34419e+06 -7.99309e+06>
50722 (0xc622) SRATIONAL (10) 9<-7.55174e+06 8.14361e+06 879872 -5.49478e+06 5.37242e+06 -5.89594e+06 -4.12595e+06 6.34419e+06 4.46438e+06>
50727 (0xc627) RATIONAL (5) 3<1 1 1>
50728 (0xc628) RATIONAL (5) 3<0.628993 1 0.771084>
50730 (0xc62a) SRATIONAL (10) 1<-32512>
50731 (0xc62b) RATIONAL (5) 1<1>
50732 (0xc62c) RATIONAL (5) 1<1>
50734 (0xc62e) RATIONAL (5) 1<1>
50740 (0xc634) BYTE (1) 102400<0x53 0x41 0x4d 0x53 0x55 0x4e 0x47 00 0x4d 0x4d 00 0x63 00 00 00 0x1 00 00 00 0x4 0x4 0x1 0x2 00 ...>
50778 (0xc65a) SHORT (3) 1<17>
50779 (0xc65b) SHORT (3) 1<21>
$
If you Google for "BitsPerSample" you will see that this indicates the number of bits per component, and if we run `tiffinfo` on the file we will see:
Code:
$ tiffinfo samsung_gx20_02.dng | grep -i rgb
  Photometric Interpretation: RGB color
$

IE: the DNG contains RGB information at 8 bits per channel. This would appear to be stored under the DNGPrivateData tag, which "provides a way for camera manufacturers to store private data in the DNG file for use by their own raw converters".

So I see absolutely no reason whatsoever to suppose that the GX-20 is doing anything more nefarious than dumping the values obtained by its sensors straight out into the DNGPrivateData section of the DNG file.

I have to say that I am somewhat surprised by how accessible I found this DNG file's data. I'm no programmer, but I would consider this an extremely readable & usable format. I have only glanced casually at this file, but I get the strong impression that it mightn't take me more than a day or two of hobbyist hacking in my rusty old C in order to get a bitmap out of it. Having downloaded a second file, I do see some "anomalies" - large sections of repeated "255,255,255", "0,0,0" and "192,0,0,6" in the DNGPrivateData of both DNGs - but I see no reason to believe these suspicious, and am sure they would be explained by further (more competent) analysis. The first two would clearly seem to indicate black & white, but it seems like the pattern repeats too many times to indicate blown-out highlights or an underlit area of the image.

Out of curiosity I looked at some of the .CR2 raw files from my Canon 350D:
Code:
$ file Pictures/2009/04/2009_04_15/IMG_1383.CR2 
Pictures/2009/04/2009_04_15/IMG_1383.CR2: TIFF image data, little-endian
$

So I can't help wondering if you're going to find that all so-called RAW files are in fact accursed TIFFs. :bonk:

Your posts in these two threads seem a little terse to me, so perhaps I have somehow got the wrong impression. Please excuse me if that's the case.

Stroller.
 
I'm not saying DNG is bad. I just prefer to know I'm in control.


I've got absolutely nothing against DNG. As an open source fanatic DNG should be the natural chose for me.

I'm going to have a look at one of the DNG files form the link you posted and report back. All I need now is a RAW sample of a Pentax.
 
IE: the DNG contains RGB information at 8 bits per channel.
That's a bit worrying, though, isn't it?

My understanding is that:
(a) modern cameras capture data on the sensor at more than 8 bits per channel; and
(b) RAW data doesn't contain any RGB values as such (because each pixel just records the intensity of light falling on it, and the colour data is a roduct of the RAW processing).

So if a DNG contains RGB data at 8 bpc, then it would seeem incompatible with it being RAW data.

:shrug:
 
That's a bit worrying, though, isn't it?

My understanding is that:
(a) modern cameras capture data on the sensor at more than 8 bits per channel; and
(b) RAW data doesn't contain any RGB values as such (because each pixel just records the intensity of light falling on it, and the colour data is a roduct of the RAW processing).

So if a DNG contains RGB data at 8 bpc, then it would seeem incompatible with it being RAW data.

:shrug:

I've just pulled this of a Samsung DNG. If you look at the last line, it is 12 bit.

This is the truncated version.

ExifTool Version Number : 7.67
File Name : samsung_gx20_02.dng
Directory : .
File Size : 23 MB
File Modification Date/Time : 2009:03:20 09:32:57+00:00
File Type : DNG
MIME Type : image/x-raw
Exif Byte Order : Big-endian (Motorola, MM)
Make : SAMSUNG TECHWIN Co.
Camera Model Name : SAMSUNG GX20
Orientation : Horizontal (normal)
Software : GX20 Ver 1.00
Modify Date : 2008:07:09 11:23:01
Image Width : 4864
Image Height : 3136
Bits Per Sample : 12​
 
That's a bit worrying, though, isn't it?

My understanding is that:
(b) RAW data doesn't contain any RGB values as such (because each pixel just records the intensity of light falling on it, and the colour data is a roduct of the RAW processing).

:shrug:

It was my understanding that the colour recorded by the pixel was determined by the RGB filter above the sensor, so therefore colour data is recorded.

Steve
 
Semantics surely...the colour data *is* captured...For each pixel site on the sensor, there will be three numbers. How that data is packaged is immaterial, as long at the bit-depth of the original output is preserved.
 
DNG supports up to 32 bits per sample so it's fairly future proof. It's entirely possible that some cameras only output 8bit raw files anyway.
 
Semantics surely...the colour data *is* captured...For each pixel site on the sensor, there will be three numbers. How that data is packaged is immaterial, as long at the bit-depth of the original output is preserved.
No. For each pixel site on the sensor, there is only one number, which measures the intensity of the light falling on that site. (Except on Foveon sensors I guess, but we're not talking about them here.) The construction of the RGB data is a product of the RAW processing.

That's why it's so easy to fix white balance with a RAW, and why applications like Lightroom can be so fast; because you have to interpret the RAW data in order to see anything at all, and it's easy to tweak the interpretation algorithm to produce a different result.
 
Semantics surely...the colour data *is* captured...For each pixel site on the sensor, there will be three numbers. How that data is packaged is immaterial, as long at the bit-depth of the original output is preserved.

Actually there are as many green receptors on the sensor as there are red and blue combined so it's not as simple as RGB.
 
Back
Top