Jump to content

Why pixel sizes between DNG and JPG different


mltx

Recommended Posts

The answer may be the following:

DNG pictures are a mosaic of Greens, Reds and Blues (Bayer pattern). Once demosaicing takes place every pixel will have three values of R, G and B respectively. These values are obtained from interpolation of the Bayer pattern.

It may be that the outer rows are eliminated by these interpolations because the interpolation algorithm applied at any point, needs more than just the 4 RAW pixels around that point.

Link to post
Share on other sites

A JPEG picture can have any size but the JPEG compression algorithm works best (most efficiently) when the pixel count along the frame's short and long edge both are multiples of 16. If at the same time the frame's aspect ratio is supposed to be 3:2 exactly then the short edge must be a multiple of 32 (2 × 16) and the long side a multiple of 48 (3 × 16). To provide enough interpolation data, the raw image should be a couple of pixels more.

 

It is not impossible to convert a raw image to a JPEG image with exactly the same pixel count—but that would require additional computing power and may lead to strange artifacts at the edges.

Link to post
Share on other sites

Thank you very much for all of your very knowledgeable enlightenment. While I learned quite a lot from those answers, I am still puzzled when comparing M240 with M-E:

 

M-E resolution:

DNG=JPG: 5212x3472  (according to tech data from Leica)

DNG:  5212x3468   (according to actual file attribute)

JPG:   5216x3472   (according to actual file attribute)

 

So here for M-E, if you look at the actual file attributes on a computer with any app, you can see that JPG has more pixels than DNG?!  And the JPG's ratio for M-E is not exactly 3:2 either.  Maybe that is because of the sensors' difference between CMOS and CCD?

Link to post
Share on other sites

JPEG files with 4:2:0 chroma subsampling must have width and height that are multiple of 16 pixels. This is a requirement of the compression algorithm.

 

But JPEG files also embed crop parameters for width and height, so the actual picture dimensions is not limited to multiples of 16 pixels.

 

I don't have any M9/MM/ME JPEG files at hand to check, but I guess you are seeing the data dimensions, not the actual picture ones.

 

P.S. The actual sensor specs are even more interesting:

http://www.onsemi.com/pub_link/Collateral/KAF-18500-D.PDF

 

Have fun !  ;)

 

 

 

Link to post
Share on other sites

Advertisement (gone after registration)

JPEG files with 4:2:0 chroma subsampling must have width and height that are multiple of 16 pixels. This is a requirement of the compression algorithm.

 

But JPEG files also embed crop parameters for width and height, so the actual picture dimensions is not limited to multiples of 16 pixels.

 

I don't have any M9/MM/ME JPEG files at hand to check, but I guess you are seeing the data dimensions, not the actual picture ones.

 

P.S. The actual sensor specs are even more interesting:

http://www.onsemi.com/pub_link/Collateral/KAF-18500-D.PDF

 

Have fun !  ;)

 

Thanks for all the information.

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...