core icon indicating copy to clipboard operation
core copied to clipboard

Explore why YCbCr color space is RGB in test_exif test

Open kba opened this issue 1 year ago • 0 comments

          Actually, Pillow just does not say anything. We could ask ImageMagick about it, though.

(However, %[EXIF:PhotometricInterpretation] does not yield anything... Not sure how to get that info.)

So IMO this test should state YCbCr and fail until we fix OcrdExif.run_identify to include the results from the CLI, or we find a way to make Pillow give us the info.

BTW, using Pillow's TiffTags we can actually get the right value:

# val = img.tag_v2.named()['PhotometricInterpretation']
val = img.tag_v2.get(262)
interpretation = dict((v, k) for k, v in TiffTags.TAGS_V2.get(262).enum.items())
val = interpretation[val]

Originally posted by @bertsky in https://github.com/OCR-D/core/pull/1276#discussion_r1781525836

kba avatar Oct 01 '24 15:10 kba