Skip to content

raw: probe the DSC-F828 SRF and DSLR-A100 ARW as Sony raws (#702) - #849

Closed
eliets2 wants to merge 1 commit into
storytold:mainfrom
eliets2:claude/issue-702-sony-probe-evidence
Closed

eliets2 wants to merge 1 commit into
storytold:mainfrom
eliets2:claude/issue-702-sony-probe-evidence

Conversation

@eliets2

@eliets2 eliets2 commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Bug: Two Sony layouts are refused by the probe as not a readable photo since #281 (fb6dda4): the DSC-F828 .srf and the DSLR-A100 .arw. Both opened on main 5436951.

Cause: The probe requires has_raw_ifd evidence, and neither layout carries it. The DSC-F828 SRF has an IFD0 that is a 14-bit-per-sample RGB image (camera/exporter TIFF images are 8 or 16 bps) with no private or CFA tags. The DSLR-A100 ARW has an IFD0 that is an old-JPEG thumbnail; tag 330 points at the Minolta raw block, which parses as a degenerate child IFD with no entries and no image.

Fix: Sony-branch only. has_sony_raw_evidence now claims a Sony file when IFD0 has 12- or 14-bit BitsPerSample, or when tag 330 is present with no child IFD describing an image (Ifd::image()). Tests cover both layouts plus three negatives (8-bit RGB, 16-bit, and a real SubIFDs child). Verified on the real CC0 files: both probe Arw after the fix.

Scope: Probe-only. vendor::arw::raw_ifd is byte-identical to 5436951 and still refuses these files with its ARW without a CFA image IFD error, so decode returns the same Unsupported error and the engine renders the embedded preview exactly as before the regression. Sensor decode of these layouts was never supported.

Tests: New: the two positive layouts and the three negatives above. Existing: cargo test -p lightcraft-raw --lib runs 253/253. Gates: cargo fmt and cargo clippy -p lightcraft-raw -- -D warnings are clean.

VERIFY:

  • cargo test -p lightcraft-raw --lib -> 253/253 pass
  • cargo clippy -p lightcraft-raw -- -D warnings -> clean
  • probe the real DSC-F828 .srf and DSLR-A100 .arw -> both report Arw

…#702)

Since storytold#281 (fb6dda4) the Sony branch of probe requires raw evidence via has_raw_ifd, but two public Sony layouts carry none of the tags it reads, so probe returned None and the engine refused them as not a readable photo. Both opened on main 5436951.

The DSC-F828 SRF keeps its raw in Sony's SRF structure: IFD0 is a 14-bit-per-sample RGB image (BitsPerSample 14 14 14), while a camera- or exporter-authored TIFF image is 8 or 16 bits per sample, and IFD0 has no private or CFA tags. The Minolta-derived DSLR-A100 ARW has an old-JPEG thumbnail in IFD0 and locates its raw block through tag 330 (SubIFDs), which the A100 uses as a plain data offset (exiftool's A100DataOffset); that block parses as a degenerate child IFD with no entries, so sub_ifds is not empty even though no child describes an image.

has_sony_raw_evidence now claims a Sony file when IFD0 has 12 or 14 bits per sample, or when tag 330 is present on IFD0 and no child IFD under it describes an image (Ifd::image()). Real Sony TIFF images are 8 or 16 bps and carry no SubIFDs, and a genuine SubIFDs child has image data, so neither rule matches them. Tests cover both layouts and two negative shapes (storytold#702).

Scope is probe-only: vendor::arw::raw_ifd is byte-identical to main 5436951 and still refuses these files with ARW without a CFA image IFD, so decode returns the same Unsupported error and the engine renders the embedded preview exactly as it did on 5436951.

Copy link
Copy Markdown
Member

Thanks, @eliets2! #702 was fixed by #774, which landed in #975 (it also refuses A100-model TIFFs that only carry a SubIFDs thumbnail), so I'm closing this as a duplicate. Your #848 and #850/#851 are separate and #848 landed.


Generated by Claude Code

@bflatastic bflatastic closed this Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants