mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-31 05:17:12 -06:00
The "is this the undecoded compressed/packed ORF" guard summed the strip byte counts and compared the sum with width × height × 2. Tiff::tag_uints returns an empty list when the entry is missing or unreadable, so a file whose IFD0 entry table is truncated (a partial download, a damaged card) summed to zero and was reported as "Olympus compressed (or packed) ORF is not decoded" — a format the user's camera does not produce — while the same file cut a few bytes earlier or later was correctly reported as malformed. Missing or unreadable strip byte counts are now RawError::Malformed before the compression check. Regression test: a synthetic uncompressed ORF cut right before its StripByteCounts entry is Malformed, and no prefix of the file reads as the compressed variant. Co-authored-by: wstock <1394687+wstock@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>