You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add RAW query, test runtime path, and EXIF recovery
Adds conservative RAW-processing queries and plumbing, a CTest runtime-library path option, improved EXIF/TIFF recovery, and C2PA trusted-chain enforcement.
Details:
- API: metadata_query.h: new MetadataQueryKind::RawProcessing, several Raw-related semantic kinds and match terms, and query_raw_processing_metadata().
- Validation: validate.h adds verify_require_trusted_chain to opt-in trusted certificate-chain enforcement for draft C2PA verification; CLI/docs updated to document the option.
- Build/tests: CMake adds OPENMETA_TEST_RUNTIME_LIBRARY_PATH and openmeta_apply_test_runtime_environment() to prepend LD_LIBRARY_PATH/DYLD_LIBRARY_PATH/PATH for CTest-launched external tools; README and docs updated.
- Container scan: implement scan_exif_preamble_tiff and use it in scan_auto to recover standalone EXIF/TIFF when a short non-TIFF or malformed-JPEG prefix precedes an Exif preamble.
- JUMBF/C2PA: jumbf_decode enhancements to collect detached-payload candidates from nested/numeric claim references and better handle malformed COSE/claim shapes.
- Cleanup: removed several unused Nikon MakerNote helper functions and minor formatting fixes across sources and many documentation updates to reflect the new behaviors and transfer-safety refinements.
Purpose: enable safer RAW-processing inspection, let tests run external tools with non-default C++ runtimes, improve robustness recovering EXIF payloads in weird inputs, and provide opt-in stricter C2PA verification semantics.
Copy file name to clipboardExpand all lines: docs/api_stability.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ different status.
22
22
| Generic metadata traversal: `visit_metadata(...)`, `MetadataSink`, `ExportOptions`, `ExportItem`|`openmeta/interop_export.h`| Stable | v1 traversal contract. Borrowed names are valid only during `MetadataSink::on_item(...)`. |
23
23
|`ExportNameStyle::Canonical` and `ExportNameStyle::XmpPortable`|`openmeta/interop_export.h`| Stable | Stable naming modes for key-space-aware and portable exports. |
| Semantic metadata query: `query_metadata(...)`, `query_crop_metadata(...)`, and focused query helpers |`openmeta/metadata_query.h`| Experimental | Query contract for inspection matches plus normalized candidates. Current coverage includes crop/active-area, exposure/gain, white balance, color, lens correction, and orientation metadata across standard tags, selected DNG tags, fuzzy XMP paths, and vendor RAW-processing classification, including grouped `matrix_set`, `vector_set`, and `table`candidates for related non-crop metadata. Python `Document` and `TransferSourceSnapshot` mirror this as thin dictionary-returning wrappers. |
25
+
| Semantic metadata query: `query_metadata(...)`, `query_crop_metadata(...)`, and focused query helpers |`openmeta/metadata_query.h`| Experimental | Query contract for inspection matches plus normalized candidates. Current coverage includes crop/active-area, exposure/gain, white balance, color, lens correction, orientation, and RAW-processing metadata across standard tags, selected DNG tags, fuzzy XMP paths, and vendor RAW-processing classification. Grouped candidates include `matrix_set`, `vector_set`, and `table`shapes for related non-crop metadata, including RAW black/white levels, linearization, CFA/sensor layout, source geometry, and raw-storage identifiers. Python `Document` and `TransferSourceSnapshot` mirror this as thin dictionary-returning wrappers. |
26
26
| Vendor RAW-processing summaries: `vendor_raw_processing_from_store(...)`, `classify_vendor_raw_processing_field(...)`|`openmeta/vendor_raw_processing.h`| Experimental | Conservative grouped source-RAW/source-processing field summaries for decoded Sony, Canon, Nikon, Fujifilm, Pentax, Panasonic, Olympus, Kodak, Minolta, Sigma, Samsung, Ricoh, Apple, DJI, Google, FLIR, Casio, Sanyo, KyoceraRaw, Reconyx, HP, JVC, GE, Motorola, Nintendo, and Microsoft MakerNotes, including vendor-private, computational, thermal, preview, face-geometry, and stitch/panorama buckets. Intended for audit/UI and rendered-transfer safety decisions, not for writing vendor RAW/source-processing values into rendered targets. |
27
27
| Transfer safety audit: `transfer_safety_audit_from_store(...)`|`openmeta/metadata_transfer.h`| Experimental | Preflight summary of source entries and entries filtered or invalidated by `TransferSafetyMode`, including Sony/Canon/Nikon/Fujifilm/Pentax/Panasonic/Olympus/Kodak/Minolta/Sigma/Samsung/Ricoh/Apple/DJI/Google/FLIR/Casio/Sanyo/KyoceraRaw/Reconyx/HP/JVC/GE/Motorola/Nintendo/Microsoft RAW/source-processing buckets. Intended for diagnostics and host UI before preparing rendered-image transfers. |
28
28
| Source snapshot type and read helpers: `TransferSourceSnapshot`, `read_transfer_source_snapshot_file(...)`, `read_transfer_source_snapshot_bytes(...)`, `build_transfer_source_snapshot(...)`|`openmeta/metadata_transfer.h`| Experimental | Current snapshots are decoded-store-backed and do not preserve raw source packets for passthrough. Const reuse is safe when callers do not mutate the snapshot and do not share returned result objects across writers. |
Copy file name to clipboardExpand all lines: docs/development.md
+36-5Lines changed: 36 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ model should stay compact:
17
17
| --- | --- | --- |
18
18
| Decoding | Find metadata carriers and decode EXIF, XMP, IPTC, ICC, Photoshop IRB, JUMBF/C2PA, EXR, and related blocks into `MetaStore` entries. | High, about 90-95% for the current target scope. |
19
19
| Interpretation | Normalize names and values, group entries by meaning, and classify source-bound data such as RAW crop, color, lens-correction, sensor, and vendor-private fields. | Medium-high, about 75-85%. |
20
-
| Query | Find entries by name, fuzzy term, or semantic group, for example crop/border/active-area fields or exposure/gainfields across standard and vendor metadata. | Low, about 15-20%. |
20
+
| Query | Find entries by name, fuzzy term, or semantic group, for example crop/border/active-area, exposure/gain, color/WB, orientation, lens-correction, and RAW-processing fields across standard and vendor metadata. | Low, about 20-25%. |
21
21
| Creation | Build fresh metadata entries from host-provided values. | Medium, about 55-65%. |
22
22
| Editing | Modify existing logical metadata entries while preserving valid surrounding structure. | Medium, about 60-70%. |
23
23
| Transfer | Move metadata between files using explicit compatible-file or rendered-image safety policies. | Medium-high, about 80-85%. |
@@ -35,15 +35,18 @@ rather than hiding ambiguity behind a single value.
35
35
36
36
The first experimental C++ query surface is `openmeta/metadata_query.h`.
37
37
It returns both raw matches and normalized candidates for crop/active-area,
38
-
exposure/gain, white balance, color, lens correction, and orientation queries.
38
+
exposure/gain, white balance, color, lens correction, orientation, and
39
+
RAW-processing queries.
39
40
Crop queries include DNG crop tags, `ActiveArea`, Phase One/Leaf raw geometry,
40
41
and fuzzy crop/border-style XMP property paths. The non-crop queries expose
41
42
per-entry value candidates and reuse standard tag names, selected DNG tags,
42
43
fuzzy XMP paths, and vendor RAW-processing classification where applicable.
43
44
They also append grouped candidates for related DNG color matrix/calibration/
44
45
reduction/forward matrix tags, DNG white-balance vector tags, and
45
-
lens-correction table groups, using `matrix_set`, `vector_set`, and `table`
46
-
value shapes.
46
+
lens-correction table groups. RAW-processing queries add conservative groups
47
+
for black/white levels, linearization tables, CFA/sensor layout, source
48
+
geometry, and raw-storage identifiers. Grouped candidates use `matrix_set`,
49
+
`vector_set`, and `table` value shapes.
47
50
Python `Document` and `TransferSourceSnapshot` mirror this as thin wrappers
48
51
returning the same match/candidate dictionary shape.
49
52
@@ -75,7 +78,10 @@ dependencies let OpenMeta decode more content:
There is no public fuzzy-search API yet. Query through exact keys and build
37
-
your own display or search layer on top.
37
+
For inspection/search UI, prefer the experimental semantic query helpers before
38
+
building a separate fuzzy layer. They report source entries, confidence, value
39
+
shape, and normalized candidates while preserving ambiguity.
38
40
39
41
## Adapter Classes
40
42
@@ -430,7 +432,7 @@ Use `TransferProfile::safety` for the broad source/destination relationship:
430
432
| Mode | Use when | Transfer policy |
431
433
| --- | --- | --- |
432
434
|`CompatibleFile`| Metadata is repackaged or recompressed into a compatible file/pixel representation | Preserve source camera, color, ICC, and camera-specific data except target-owned image-layout fields |
433
-
|`RenderedImage`| Pixels may have changed, especially RAW-to-JPEG/PNG/WebP/JXL/HEIF/AVIF export | Keep general/time/GPS/IPTC/portable XMP; drop source raw color calibration, linearization/crop/correction metadata, vendor RAW/source-processing geometry/color/correction/thermal/computational/private/stitch fields, camera raw settings XMP, source ICC, opaque MakerNotes, and non-C2PA JUMBF |
435
+
|`RenderedImage`| Pixels may have changed, especially RAW-to-JPEG/PNG/WebP/JXL/HEIF/AVIF export | Keep general/time/GPS/IPTC/portable XMP; drop source raw color calibration, profile/gain tables, raw digests/storage identifiers, linearization/crop/correction metadata, vendor RAW/source-processing geometry/color/correction/thermal/computational/private/stitch fields, camera raw settings XMP, source ICC, opaque MakerNotes, and non-C2PA JUMBF |
434
436
435
437
See [writer_target_contract.md](writer_target_contract.md#transfer-safety-matrix)
0 commit comments