Camera Raw/DNG: Lossy DNG larger than lossless with really dark image

  • 1
  • Problem
  • Updated 5 years ago
  • (Edited)
Ok, so I have a couple of photos showing the night sky, uncompressed they were around 18 MB. DNG lossless got one down to around 8 MB. Compressing it lossy bloated it up to 23 (!) MB. The particular photo in question is pitch black (underexposed). Am I right in assuming that too dark photos pose problems to the algorithm? Trying to compress the file lossless won't help, it will remain quite big. What's wrong?
Photo of kada

kada

  • 3 Posts
  • 0 Reply Likes

Posted 6 years ago

  • 1
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 14546 Posts
  • 1891 Reply Likes
Just to confirm, for normally exposed images, the files are smaller with Lossy DNG, but for this specific black/underexposed image - it is larger.
Photo of Eric Chan

Eric Chan, Camera Raw Engineer

  • 617 Posts
  • 121 Reply Likes
Can you post the example image (i.e., the raw file)? Or you can send it (YouSendIt.com, dropbox, etc.) to madmanchan2000@yahoo.com. Thanks.
Photo of Eugen Schmidt

Eugen Schmidt

  • 3 Posts
  • 0 Reply Likes
I have the same problem and can confirm this. Darker lossy DNGs are bigger than lossless DNG and the original RAW file.

original RAW = 23,8 MB
simple DNG = 24,9 MB
lossy DNG = 26,8 MB

original RAW converted to JPEG = 19,5 MB
brightened JPEG = 24,9 (as big as DNG)
Photo of kada

kada

  • 3 Posts
  • 0 Reply Likes
Sorry, forgot to reply to the thread. But basically try to convert photos of old cameras, i.e. something with 3-6 MP, especially high ISO ones. You'll probably be able to replicate the problem. The noisier the photo (i.e. high ISO plus lots of dark parts which get even more noise) the bigger the files, that can easily go so far that the files are much bigger than the lossless files.

I guess the problem is that noise won't compress well in a lossy way without losing a ton of information, and since lossy DNG is supposed to be nearly as good as lossless DNG...

I don't have any problems with files from my 16 MP DSLR... they compress well.

Please let me know if you still want to have samples... I suppose the fix would be to have a setting where we can say if the savings are less than say 20% then keep the original instead.

@Eugen: I haven't seen original RAW files that are smaller than the DNG version created in Lightroom. What camera do you use? For my Pentax regardless if I use the Pentax own NEF format or DNG, once I recompress in Lightroom to lossless DNG it will still be smaller, usually by a couple of MB.
Photo of Eugen Schmidt

Eugen Schmidt

  • 3 Posts
  • 0 Reply Likes
hey, here is a picture.
The file I talked about is below in the picture. It gets bigger no matter how I export it.

The other one on the top gets a little bit smaller as lossless DNG, but much more bigger in lossy mode.

These RAW files belong to Sony NEX-7. This problem seems to happen when the picture is dark or underexposed. Combined with high ISO the file size rises up to 40 MB in the lossy DNG-Version. The average size of the nex7 RAW is round about 24 MB.

I tested first RAW files from Canon EOS 5D Mark II. The lossless DNGs have the same behavior. Sometimes they are a little bit smaller or bigger filesize, but the lossy DNGs were always much smaller compared to the original RAW file. That's the reason why I am so confused about that, when I saw the NEX-7 files.

Photo of Eric Chan

Eric Chan, Camera Raw Engineer

  • 617 Posts
  • 121 Reply Likes
Sony raw files use a fixed block compression scheme so they're generally all about the same size (they vary a bit due to the embedded JPEG, thumbnail, etc.). Lossless and lossy compressed DNGs will often be smaller than the ARW files, but not always. Images with a significant amount of noise will not compress as well in the DNG files and may become bigger as you have seen.