mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-14 19:27:01 -04:00
The Bayer layout of Canon CR2 files differs by model (GBRG on the 7D, 50D, 60D, 550D, 600D, 1200D, 1300D, 5D Mark II, 1D Mark IV; RGGB on the 40D, 5D Mark III, 6D, 5DS R and others). Read it from raw IFD tag 0xc5e0 (CR2CFAPattern: 1 RGGB, 2 BGGR, 3 GBRG, 4 GRBG), anchored at the full decoded sensor; fall back to RGGB when the tag is missing. No model table. Checked on 35 decoded CC0 raw.pixls.us CR2s (35 models): the tag agrees with the mosaic's green-diagonal statistic on every file; the SensorInfo border parity does not predict the layout. Corpus manifest gains the reporter's samples; a corpus test asserts each layout. Co-Authored-By: Claude Opus 5.5 <[email protected]>