Repository navigation
Conversation
…#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.
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: