2021.01.15 16:38 "[Tiff] Issue reading .CR2 files (OJPEG) in libtiff ver 4.0.10", by Agnish Dutta

Hello,

I'm a developer at MathWorks working on Image formats. One of our customers reported an issue with reading a .CR2 raw image file (Roda.CR2) in the version of our software which uses the 4.0.10 version of the libtiff library. He said that he sees an all green image when he decodes the file and that this wasn't the case in an earlier version of our software (which used libtiff 4.0.0).

To verify if the issue is with the library I created a standalone file (main.cpp) and build it with the 4.0.10 version of the library to decode the attached Roda.CR2 file and store the cdata in a binary file (viewable in any online binary file editor) and saw that it indeed was the case that the Red and Blue channels had all 0's and the Green channel had all 135's. I used the same code with the 4.0.0 version but this time the image was decoded fine.

How one can reproduce the issue:

Platform

I was wondering if this is a known issue or not. I found the following link which is about a bug somewhat similar in nature to the one we've encountered:

https://gitlab.com/libtiff/libtiff/-/commit/0356ea76bac908c61160d735f078437ace953bd3

If this is indeed a known bug then could you kindly also mention what's planned for it?

Thanks,
Agnish Dutta
MathWorks.