I'm checking how to calculate that value from a JPEG file and I'm pretty confused:

YCbCrPositioning should be defined as shown in this page: https://freeimage.sourceforge.io/fnet/html/4A015DE9.htm

This page is already a bit unclear, but I think what it means is that if Y=4, Cb=2 and Cr=2 then YCbCrPositioning should be set to 2, in all other cases to 1.

That Y:Cb:Cr seems to refer to this thing: https://en.wikipedia.org/wiki/YCbCr

There it says how each of these values would be calculate, for example Y, would be calculated as shown here https://en.wikipedia.org/wiki/Luma_(video), and Cb and Cr as shown here https://en.wikipedia.org/wiki/Chrominance.

But at this point I'm pretty lost, how can you get the values needed to calculate Y, Cb and Cr from a JPEG image?


You can read the Y, Cb, and Cr values with any EXIF reader. EXIF Tools is a nice choice. You can also read the EXIF values with Python if you like. Here is a screen shot from EXIF Tool.

enter image description here

Not the answer you're looking for? Browse other questions tagged or ask your own question.