Pages: [1]   Go Down

Author Topic: Leica M DNG. Compression or Uncompressed?  (Read 10361 times)

JB Rasor

  • Full Member
  • ***
  • Offline Offline
  • Posts: 157
    • JB Rasor
Leica M DNG. Compression or Uncompressed?
« on: October 24, 2013, 06:08:13 am »

Hello everyone. After 10 months my Leica M 240 arrived and I wanted to get some advice about shooting with lossless DNG compression. I do understand that, in the most basic sense, lossless compression simply throws away the empty space within the file. However, I'm concerned it may be throwing something of value away also. Say...bit depth? Or accurate Gamma compression? Or am I simply wrong here and should shoot compressed and not look back?

Thanks everyone!
Logged

JeanMichel

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 524
Re: Leica M DNG. Compression or Uncompressed?
« Reply #1 on: October 24, 2013, 12:29:44 pm »

Hi,
You may want to search for this on the Leica users forum http://www.l-camera-forum.com/leica-forum/, there is some good information on this, along with less informed opinions. There was also an article or two in LFI, but I do not remember in which editions. Personally, I see no reason to use compressed DNG as storage space is a non-issue. I tried the compressed setting when I first purchased my M9 and found no difference in file quality, but I figured: why compress if I don't have to? 
Jean-Michel
Logged

duane_bolland

  • Jr. Member
  • **
  • Offline Offline
  • Posts: 77
    • flexiblelightphotography.com
Re: Leica M DNG. Compression or Uncompressed?
« Reply #2 on: October 24, 2013, 12:55:59 pm »

I can't answer this, but I feel compelled to note that "lossless" means very specifically that no data is being discarded.  Instead of writing "000000000000000000000000", the compressed format writes "0x24" which obviously takes up much less space.  Zip files are lossless.  JPGs are not.  I find it highly unlikely that a company like Leica would misuse the term "lossless".  Very often "lossless" formats use zip under the covers.  Zip has no concept of placing value on data; it treats it all as valuable and doesn't discard any of it. 
Logged

ErikKaffehr

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 11311
    • Echophoto
Re: Leica M DNG. Compression or Uncompressed?
« Reply #3 on: October 24, 2013, 01:08:14 pm »

Hi,

I don't think zip compression works for digital files. What I would think is that Leica uses some kind logarithmically encode format compression 14 bits of info into 8 bits. See it this way 3 electrons encode in two bits. Three electrons or two electrons matter a lot. On the other hand 15624 or 15625 electrons are also a bit apart. Who cares about that bit, there is 125 levels of noise corresponding to 7 bits of information. Let's say we discard 5-6 bits, it doesn't matter a bit. So you can use bits wisely and save some bits.

On the other hand, disk space is cheap this days. Inventing a storage method of your own can save some bits, but it may make your data less future proof.

Best regards
Erik

I can't answer this, but I feel compelled to note that "lossless" means very specifically that no data is being discarded.  Instead of writing "000000000000000000000000", the compressed format writes "0x24" which obviously takes up much less space.  Zip files are lossless.  JPGs are not.  I find it highly unlikely that a company like Leica would misuse the term "lossless".  Very often "lossless" formats use zip under the covers.  Zip has no concept of placing value on data; it treats it all as valuable and doesn't discard any of it. 
Logged
Erik Kaffehr
 

Jim Kasson

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2370
    • The Last Word
Re: Leica M DNG. Compression or Uncompressed?
« Reply #4 on: October 24, 2013, 02:49:36 pm »

I do understand that, in the most basic sense, lossless compression simply throws away the empty space within the file. However, I'm concerned it may be throwing something of value away also. Say...bit depth? Or accurate Gamma compression? Or am I simply wrong here and should shoot compressed and not look back?

When used by engineers, the term "lossless" has a precise meaning. Every bit (in both senses) of the word of the original file can be reconsructed upon decompression. As used by copywriters, salespeople, and product managers, the term's meaning is more malleable, and can mean anything from the engineering definition to "I can't see the difference in the files".

I've seen missing codes in some manufacturers "lossless" files, which shouldn't happen with the engineering definition. In the absence of the manufacturer's specifying the compression algorithm. I vote for uncompressed. I've done that with my M240, although I think it's probably overkill.

Jim

JB Rasor

  • Full Member
  • ***
  • Offline Offline
  • Posts: 157
    • JB Rasor
Re: Leica M DNG. Compression or Uncompressed?
« Reply #5 on: October 24, 2013, 11:01:42 pm »

You're probably right Jim, about it being overkill. But I'm inclined to deal with double the file size until I can really sit down and do some testing with the compressed DNG. My fear really, is that bit depth may be compressed and banding issues could arise. Though I don't actually know that for a fact at all. It's like you said, lossless is the marketing term and the scientific term. So I'll shoot uncompressed unless someone suggests otherwise, with a good explanation :)

Thanks again everyone!
Logged

xocet

  • Newbie
  • *
  • Offline Offline
  • Posts: 41
Re: Leica M DNG. Compression or Uncompressed?
« Reply #6 on: October 25, 2013, 05:28:36 pm »

zip compression does work for digital picture files, but it depends on which format.

It won't compress files that are already compressed, e.g. jpg files. It can work for uncompressed TIFF files.  In many cases, if you try to compress an already compressed file, the resulting file can end up larger than the original.

Lossless means entirely that: you can decompress the compressed file and end up with the exact same file as the original, bit for bit.  In fact, on some (enterprise) storage systems, data may be compressed and de-duplicated without you the user ever knowing.
 
Logged

BrianVS

  • Full Member
  • ***
  • Offline Offline
  • Posts: 164
Re: Leica M DNG. Compression or Uncompressed?
« Reply #7 on: October 25, 2013, 05:58:18 pm »

Does anyone know the type of lossless compression used? Run-Length-Encoding for each of the Red-Green-Blue layers would work on most images; on some with great detail- would require more storage. Storing differences has also been used; Store a reference pixel using all 14-bits, then store the running differences using 8-bits for -126 through +127. Use "-128" as an escape to store a new 14-bit reference for when the difference exceeds 8-bits. Works well most of the time. This scheme would work well on the M Monochrom.

JPEG has a lossless-mode, usually get between 2:1 and 3:1 compression. The coefficients are stored using Huffman encoding, accounts for about the compression.
Logged
Pages: [1]   Go Up