
Thread
2023.04.08 13:22 "Re: [Tiff] TIFF/EP", by David C. Partridge
I *think* that this is about right.
//
// Attempt to read the CFA from the root dir
//
uint16_t cfarepeatpatterndim[2]{ 0 };
if (TIFFGetField(m_tiff, TIFFTAG_CFAREPEATPATTERNDIM, &cfarepeatpatterndim))
{
uint16_t
x{ (cfarepeatpatterndim[0]) },
y{ (cfarepeatpatterndim[1]) };
uint8_t* cfapattern = static_cast<uint8_t*>(alloca(x * y));
TIFFGetField(m_tiff, TIFFTAG_CFAPATTERN, &cfapattern);
}