Jump to content

New M DNG compression


stevegoldenberg

Recommended Posts

Advertisement (gone after registration)

This workflow will not be possible any more with loseless compressed DNGs of the M, if I understand right.

Really? Compressed DNGs have been around for many years; Adobe’s DNG Converter offers to apply loss compression, for example. I always thought that Photoshop CS5 could deal with compressed DNGs.

Link to post
Share on other sites

  • Replies 75
  • Created
  • Last Reply
Really? Compressed DNGs have been around for many years; Adobe’s DNG Converter offers to apply loss compression, for example. I always thought that Photoshop CS5 could deal with compressed DNGs.

 

Michael, do you know how PS, LR, ACR, etc work with compressed DNG files? I mean, are the files re-constituted into the original un-compressed files, or do the raw converters process the actual compressed files?

Link to post
Share on other sites

This was mentioned in the latest issue of LFI magazine in Michael's article. It seems the lossless compression of the M produces a variable size file depending on the redundant detail in a shot. A lot of detail means larger files very close to the size of the original uncompressed file. It is claimed that the lossy compression of the M9 is faster and more efficient.

 

As for other brands, my previous experience with Canon DSLR is that the raw files are always compressed and there is no option for uncompressed.

 

Based on that I wouldn't hesitate to use compression, when I get my M :)

Link to post
Share on other sites

  • 4 weeks later...

If it's a no brainer to use lossless compression then why give us the choice? Why even have the line item with 2 choices?

 

1) Some old software cannot handle compressed DNG.

2) Leica's default settings are "conservative" to say the least (I have another word for this...). The default image format is not even DNG but JPG :eek:

Link to post
Share on other sites

About the M Typ 240 DNG compression: it is LOSSLESS JPEG. Don't be afraid about the word "JPEG", it is a completely different algorithm and it is safe.

 

Demonstration for nerds follows. Stop reading if you are a serious photographer ;)

 

As per DNG specs:

If PhotometricInterpretation = 6 (YCbCr) and BitsPerSample = 8/8/8, or if PhotometricInterpretation = 1 (BlackIsZero) and BitsPerSample = 8, then the JPEG variant must be baseline DCT JPEG.

Otherwise, the JPEG variant must be lossless Huffman JPEG.

 

[...]

Exif.SubImage1.NewSubfileType = Primary image

Exif.SubImage1.ImageWidth = 5984

Exif.SubImage1.ImageLength = 4000

Exif.SubImage1.BitsPerSample = 16 [this means 16 bits per pixel]

Exif.SubImage1.Compression = JPEG [this indicates both lossy and lossless]

Exif.SubImage1.PhotometricInterpretation = Color Filter Array [this indicates lossless compression]

[...]

 

It is interesting to note that this is the same format LR silently uses to compress DNG images (such as the ones generated by the M9) when you select "Update DNG Preview & Metadata" (which everybody should do. as it saves about 50% disk space on M9 files).

 

I am now enabling Compressed DNG on my brand new M Typ 240 :D

 

P.S. And the M9 has plenty of power to perform lossless compression, but the firmware is "less than ideal" (I have another word for this).

Link to post
Share on other sites

Not that I'm disagreeing (or agreeing), but do you have any basis for this statement?

 

-robert

 

Of course: Lossy JPEG (which M9 implements) is more computational intensive than Lossless JPEG.

 

Most people do not realize how much good software makes the difference between a good and a great product.

 

And it is my very personal opinion that the M9 is not a great product because of usability issues, many of which are software related. I just upgraded to the M Typ 240, and the first impression is that Leica has not learned much in all these years.

Link to post
Share on other sites

And the M9 has plenty of power to perform lossless compression ...

No, it hasn't, so it doesn't.

 

 

Lossy JPEG (which M9 implements) is more computational intensive than Lossless JPEG.

In fact, the lossy compression method used in the M8 and M9 has absolutely nothing to do with JPEG. Instead, it's an effective yet simple method which discards half the data but no image quality, and requires hardly any computational power.

Link to post
Share on other sites

The only true way to test the theory is to do an MD5 hash comparison between a full size DNG and a compressed DNG which has been 'uncompressed'. If the hash values match and the file sizes in bytes are identical then there is 0 compression.

 

Speaking as a computer forensic practitioner I would have to say that I doubt the two values would match, after all, some amount of computation (shifting around and transposition of bytes) has taken place within the algorithm.

 

The real question is does it matter. If there is a difference it will be small and probably irrelevant. Certainly not noticeable to the naked eye.

 

I don't have my M yet so I cannot actually do this test yet. If anyone is at all interested I can repost when I get my M.

 

Lee

Link to post
Share on other sites

Of course: Lossy JPEG (which M9 implements) is more computational intensive than Lossless JPEG.

 

On a general purpose processor, yes. On a DSP processor with an instruction set optimized to handle DCT transforms - not.

 

Sandy

Link to post
Share on other sites

The only true way to test the theory is to do an MD5 hash comparison between a full size DNG and a compressed DNG which has been 'uncompressed'. If the hash values match and the file sizes in bytes are identical then there is 0 compression.

 

The raw data will match. Bit for bit. Promise. :cool:

 

Sandy

Link to post
Share on other sites

You won't be able to do that test, even when you get your M. There's no way to get the camera to process the identical raw sensor data by both methods for comparison.

 

-robert

 

 

The only true way to test the theory is to do an MD5 hash comparison between a full size DNG and a compressed DNG which has been 'uncompressed'. If the hash values match and the file sizes in bytes are identical then there is 0 compression.

 

Speaking as a computer forensic practitioner I would have to say that I doubt the two values would match, after all, some amount of computation (shifting around and transposition of bytes) has taken place within the algorithm.

 

The real question is does it matter. If there is a difference it will be small and probably irrelevant. Certainly not noticeable to the naked eye.

 

I don't have my M yet so I cannot actually do this test yet. If anyone is at all interested I can repost when I get my M.

 

Lee

Link to post
Share on other sites

In fact, the lossy compression method used in the M8 and M9 has absolutely nothing to do with JPEG. Instead, it's an effective yet simple method which discards half the data but no image quality, and requires hardly any computational power.

 

We are talking about lossy compression of the DNG by truncating bit depth, correct?

 

You won't be able to do that test, even when you get your M. There's no way to get the camera to process the identical raw sensor data by both methods for comparison.

 

-robert

 

Due to thermal differences of the sensor for each image to compare?

 

 

--

I be d41d8cd98f00b204e9800998ecf8427e

Link to post
Share on other sites

In fact, the lossy compression method used in the M8 and M9 has absolutely nothing to do with JPEG. Instead, it's an effective yet simple method which discards half the data but no image quality, and requires hardly any computational power.
We are talking about lossy compression of the DNG by truncating bit depth, correct?

No, we don't.

Link to post
Share on other sites

The only true way to test the theory is to do an MD5 hash comparison between a full size DNG and a compressed DNG which has been 'uncompressed'.

 

Lee

How are you going to create identical DNGs?

Link to post
Share on other sites

How are you going to create identical DNGs?

 

You can use Adobe's DNG converter to process a compressed DNG into uncompressed or vice-a-versa. Metadata will change, but the uncompressed raw data will match.

 

Sandy

Link to post
Share on other sites

No, it hasn't, so it doesn't.

 

Says who ? You clearly know how to prove your points...

 

In fact, the lossy compression method used in the M8 and M9 has absolutely nothing to do with JPEG. Instead, it's an effective yet simple method which discards half the data but no image quality, and requires hardly any computational power.

 

I am talking about DCT-JPEG, not that one. Please read more carefully.

Link to post
Share on other sites

On a general purpose processor, yes. On a DSP processor with an instruction set optimized to handle DCT transforms - not.

 

Lossless JPEG compression is so simple and light that it can be implemented on very low power general purpose processors.

A DSP is overkill (but it's there anyway, so there are really no excuses).

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...