Pages: [1]   Go Down

Author Topic: saving as a dng increases bit depth  (Read 4782 times)

bwana

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 309
saving as a dng increases bit depth
« on: March 18, 2014, 12:47:17 pm »

I have a fuji x100s raw file which shows a 14 bit depth in raw digger(~16000 shades = 2^14)
(see DSCF0862-raf below)
I exported that image as a dng from LR 5.3 and its histogram shows a 16 bit depth(~65000 shades = 2^16)
(DSCF0862-raf-to dng)

Maybe you all know this, but I did not realize that dng files were 16 bit.
Logged

sandymc

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 350
Re: saving as a dng increases bit depth
« Reply #1 on: March 18, 2014, 02:20:13 pm »

Only because this particular raw file has been converted to linear raw format. AKA, it no longer contains raw data. The pixel counts are a dead give away.

Logged

PeterAit

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 4559
    • Peter Aitken Photographs
Re: saving as a dng increases bit depth
« Reply #2 on: March 18, 2014, 02:47:22 pm »

First of all, if the original image has 14 bits of information, exporting it as 16 bits does not do a damn thing for you (other than use up disk space). Second of all, so what? Does it improve your photos? No, duh.
Logged

bwana

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 309
Re: saving as a dng increases bit depth
« Reply #3 on: March 18, 2014, 03:43:02 pm »

Although it does not change the image, would it not allow better manipulation? After all, if i change 1 bit in a 14 bit image that is equal to 3 bits in a 16 bit image-that's 4x more range, 4x more shades, 4x more tonal choices. Although we've come a long way from 8 bit images and the posterization that goes along with them, there is still the final arbiter, the print. Yes, I realize that you cannot see a 16 bit image in its full glory on a 10 or 14 bit IPS display panel, but the goal is the print.

Certainly, if you are only editing for sRGB and web display, there is no need (well, maybe if your sensor cant do reds well and the added bit depth prevents the garish-ness).

So the added bit depth is just a bigger sandbox for you to play in when you munge your raws.
Logged

digitaldog

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 20630
  • Andrew Rodney
    • http://www.digitaldog.net/
Re: saving as a dng increases bit depth
« Reply #4 on: March 18, 2014, 03:54:42 pm »

Photoshop (and perhaps this DNG) treat all high bit files (anything with more than 8-bits per color) as 16-bit (actually 15-bit but that's a different story). I don't believe it's doing any conversions, it just treats a 10, 12, 14 bit file the same. What benefit would it be to see all the various value options broken out in the PS Mode submenu?
Logged
http://www.digitaldog.net/
Author "Color Management for Photographers".

bwana

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 309
Re: saving as a dng increases bit depth
« Reply #5 on: March 18, 2014, 04:05:41 pm »

Only because this particular raw file has been converted to linear raw format. AKA, it no longer contains raw data. The pixel counts are a dead give away.



Ok, linear raw. What's that? Yes I know, I did this
http://bit.ly/1g7IHr2

but how do you deduce this from the pixel counts? I thought a 'linear raw' was simply a demosaic-ed raw that had no gamma curve applied. and why is that saved in a dng file by lightroom? shouldnt it be a tiff since it's de-mosaic-ed?

or it isnt really a tiff because it has no white balance adjustment or color space assignment either? so maybe it should be a different format like Lraw?
Logged

bwana

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 309
Re: saving as a dng increases bit depth
« Reply #6 on: March 18, 2014, 04:20:02 pm »

Photoshop (and perhaps this DNG) treat all high bit files (anything with more than 8-bits per color) as 16-bit (actually 15-bit but that's a different story). I don't believe it's doing any conversions, it just treats a 10, 12, 14 bit file the same. What benefit would it be to see all the various value options broken out in the PS Mode submenu?

This interesting article dissects the significance of bit depth and color spaces.
http://www.earthboundlight.com/phototips/srgb-versus-adobe-rgb-debate.html
I guess your point is that the difference between 12 bit and 16 bit is negligible.

So then the question flips to become, why bother saving the dng as 16 bit? it just takes up more disk space. Is it because data registers in computer architecture are based on 8 bit bytes? so the minimum storage size is 2 bytes (= 16 bits) and  the extra bits would just get thrown away-so why not use them?
Logged

digitaldog

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 20630
  • Andrew Rodney
    • http://www.digitaldog.net/
Re: saving as a dng increases bit depth
« Reply #7 on: March 18, 2014, 04:24:23 pm »

So then the question flips to become, why bother saving the dng as 16 bit?
It is high bit, it could be as high as 16-bit.
Logged
http://www.digitaldog.net/
Author "Color Management for Photographers".

sandymc

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 350
Re: saving as a dng increases bit depth
« Reply #8 on: March 18, 2014, 04:34:15 pm »

but how do you deduce this from the pixel counts? I thought a 'linear raw' was simply a demosaic-ed raw that had no gamma curve applied. and why is that saved in a dng file by lightroom? shouldnt it be a tiff since it's de-mosaic-ed?

Just look at the difference between pixel counts on the screenshots you posted. The RAF one is correct for a X-Trans sensor with its 6x6 layout, the DNG has reds=greens=blues=total number of pixels in the image. That means linear raw. So far as I am aware, Adobe always write linear raw as 16 bits.
Logged

bwana

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 309
Re: saving as a dng increases bit depth
« Reply #9 on: March 18, 2014, 06:41:00 pm »

indeed, exiftool says this about the dng


File Modification Date/Time     : 2014:03:18 12:38:48-04:00
File Access Date/Time           : 2014:03:18 18:09:31-04:00
File Inode Change Date/Time     : 2014:03:18 12:38:48-04:00
File Permissions                : rw-r--r--
File Type                       : DNG
MIME Type                       : image/x-adobe-dng
Exif Byte Order                 : Little-endian (Intel, II)
Make                            : FUJIFILM
Camera Model Name               : X100S
Strip Offsets                   : 168348
Orientation                     : Horizontal (normal)
Rows Per Strip                  : 171
Strip Byte Counts               : 131328
Software                        : Adobe Photoshop Lightroom 5.3 (Macintosh)
Modify Date                     : 2014:03:18 12:38:48
Image Width                     : 4936
Image Height                    : 3296
Bits Per Sample                 : 16 16 16
Compression                     : JPEG
Photometric Interpretation      : Linear Raw
Samples Per Pixel               : 3
Planar Configuration            : Chunky
White Level                     : 65535 65535 65535
Default Scale                   : 1 1
Default Crop Origin             : 20 16
Default Crop Size               : 4896 3264
Anti Alias Strength             : 1
Best Quality Scale              : 1
Opcode List 3                   : (Binary data 184 bytes, use -b option to extract)


Notice 16 bits/sample
Linear Raw interpretation
JPEG compression!

So that means dng files from lightroom are not real raw files.
Logged

BobShaw

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2218
    • Aspiration Images
Re: saving as a dng increases bit depth
« Reply #10 on: March 18, 2014, 09:41:14 pm »

A byte is 8 bits, So a Jpeg image uses 1 byte per colour per pixel. If you need more than 8 bits then you need two bytes, as there are no fractions in digital. So it's 16 bits, whether use them or not. If it was say 14 bits then two of the bits are not used or set to 0 or whatever. You are not increasing the bit depth directly by saving 14 bit as 16 bit, just every 4th value will be used. You have 16384 shades per colour

However once you start to edit you will use all 16 bits or 65000 shades or so as the editor will use all the values it has.

Pixel count has zero to do with bit depth.
Logged
Website - http://AspirationImages.com
Studio and Commercial Photography

bwana

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 309
Re: saving as a dng increases bit depth
« Reply #11 on: March 18, 2014, 09:59:40 pm »


Pixel count has zero to do with bit depth.

I think that was a typo on sandy's part and that he did not mean to type pixels, but rather 'shades'. I understood what he meant although you are correct.
What I found interesting in the link that I posted is that bit depth has nothing to do with colorspace.
Bitdepth being the potential number of shades that can be represented.
Colorspace being the number of shades actually represented and the numerical value assigned to each.

Ultimately, Sandy correctly deduced that the dng produced by lightroom is a linear raw and this is confirmed by exiftool.
Logged

TonyW

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 643
Re: saving as a dng increases bit depth
« Reply #12 on: March 19, 2014, 04:01:04 am »

indeed, exiftool says this about the dng

...
Notice 16 bits/sample
Linear Raw interpretation
JPEG compression!

So that means dng files from lightroom are not real raw files.

Are you sure your Lightroom settings are correct as my suspicion given the information is that you have actually exported as lossy DNG therefore producing a linear raw file which does use JPEG compression.

Check your settings File / Export one file.  In the File Settings dialogue Compatibility Camera Raw 7.1 or later I think the appropriate choice and  turn off lossy compression.
Logged

ErikKaffehr

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 11311
    • Echophoto
Re: saving as a dng increases bit depth
« Reply #13 on: March 19, 2014, 04:29:17 am »

Hi,

That means that the file has been demosaiced. So it is not really a raw file. DNG export has many options, among them the option to imbed the original raw image.

Best regards
Erik


I think that was a typo on sandy's part and that he did not mean to type pixels, but rather 'shades'. I understood what he meant although you are correct.
What I found interesting in the link that I posted is that bit depth has nothing to do with colorspace.
Bitdepth being the potential number of shades that can be represented.
Colorspace being the number of shades actually represented and the numerical value assigned to each.

Ultimately, Sandy correctly deduced that the dng produced by lightroom is a linear raw and this is confirmed by exiftool.
Logged
Erik Kaffehr
 

digitaldog

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 20630
  • Andrew Rodney
    • http://www.digitaldog.net/
Re: saving as a dng increases bit depth
« Reply #14 on: March 19, 2014, 11:10:13 am »

DNG's are raw data IF saved correctly.
I wonder if the JPEG data being accessed and reported is the preview? DNG's can have JPEG's of the current rendering embedded into the container. One can control the size too.
Logged
http://www.digitaldog.net/
Author "Color Management for Photographers".

matoqui

  • Newbie
  • *
  • Offline Offline
  • Posts: 40
    • M. Toledo Photography
Re: saving as a dng increases bit depth
« Reply #15 on: March 19, 2014, 08:52:35 pm »

Actually,  a program can internally represent data using any number of bits. In digital it is possible to use 12 bits, for example. That would be one and a haf bytes. Thre is even a term for half a byte (nibble).

bwana

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 309
Re: saving as a dng increases bit depth
« Reply #16 on: March 20, 2014, 02:53:57 pm »

Are you sure your Lightroom settings are correct as my suspicion given the information is that you have actually exported as lossy DNG therefore producing a linear raw file which does use JPEG compression.

Check your settings File / Export one file.  In the File Settings dialogue Compatibility Camera Raw 7.1 or later I think the appropriate choice and  turn off lossy compression.

you r right. only the checkbox for fast load data was checked. tnx.
Logged

Jeremy Roussak

  • Administrator
  • Sr. Member
  • *****
  • Offline Offline
  • Posts: 8961
    • site
Re: saving as a dng increases bit depth
« Reply #17 on: March 21, 2014, 04:35:45 am »

Thre is even a term for half a byte (nibble).

There is: and it's term which I've always found more amusing when spelled "nybble". There's no hardware which can deal directly with nybbles, though.

Jeremy
Logged
Pages: [1]   Go Up