Repository navigation
Conversation
| if (required > encrypted.size() || parent.count() < required) | ||
| return; | ||
| for (size_t i = 0; i < required; ++i) | ||
| encrypted[i] = static_cast<byte>(parent.toUint32(i)); |
| // Raw-only imports have no derived view; deleting an existing view alone is an edit. | ||
| const auto actual = sonyLensValues(data); | ||
| if (actual.empty()) { | ||
| const auto raw = data.findKey(ExifKey("Exif.Photo.MakerNote")); |
a6b71ac to
390bc32
Compare
|
Thanks for working on this. IMHO there are two separate PRs here, so let's please split them:
For the first I have my reservations - can't we do something simpler and more generic, along the lines of Pentax DNG makernotes vs PEF ones? I'm thinking this might not be specific to Sony and there will potentially be others to unwrap? The second is so big that I'm afraid I won't have the bandwidth to review in depth, and will defer to other project members to decide whether we simply trust the AI re-implementation of exiftool... |
Decode headerless Sony2 MakN records with their saved byte order and original offsets using bounded TIFF reading and existing Sony decoders. Keep the complete Adobe private block opaque during unrelated writes and reject edits to its read-only metadata view before source modification. Add generated regressions for relocation, malformed records, resource limits, metadata preservation, and rejected writes in CMake and Meson. Refs Exiv2#2913.
Expose distortion, vignetting and chromatic-aberration arrays for documented Sony 9405b layouts, including Adobe-wrapped MakerNotes. Keep encrypted parents opaque and reject edits to derived fields before encoding. Prepare Sony metadata once and leave other brands on the existing encoding path. Refs Exiv2#2913.
Apply clang-format 20 to align TIFF reader member comments after adding isolated Sony MakerNote state.
390bc32 to
2bb73c8
Compare
|
Tick the box to add this pull request to the merge queue (same as
|
Refs #2913.
Read Sony2 MakerNotes stored in Adobe DNG MakN records and expose distortion, vignetting, and chromatic-aberration arrays from supported 9405b layouts in native and converted files.
Preserve opaque MakerNote payloads during unrelated edits and reject changes to read-only derived fields. Unsupported layouts remain opaque; SR2, 2010h, and 9416 decoding are outside this change.
Tested with 189 focused cases across debug, no-XMP, sanitizers, and Meson; full debug CTest passes 8/8 suites. Coefficients and existing metadata were checked against ExifTool and baseline results on 17 samples.
AI assistance: OpenAI Codex assisted with implementation, tests, and this description.