darktable-org / darktable-org/rawspeed

Exif data from Silverfast DNG causes rawspeed to fail

Open
#283 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
456
Forks
147
PR merge metrics
No merged PRs in 30d

Description

This is a follow up issue from the darktable issue (https://github.com/darktable-org/darktable/issues/9447).

tldr of 9447:

  • Silverfast (filmscanner) may produce DNG files with additional exif data (IFD1 + PreviewTiff) which causes rawspeed to report the image as corrupt.
  • sample images found here

First thought, as shared within the 9447, was that because of the IFD1 Block rawspeed may fail. So I tried to remove it.
I ran exiftool -all= <file> and magically rawspeed (accessed via darktable) could read the image and all went well. Hurray!
Now I tried to find out whats different within the files.

I made a diff of the exiftool -v output (see attached) and the IFD1 and PreviewTiff Blocks are still present, but what was removed was:

  • IFD0:ApplicationNotes
  • IFD0:ExifOffset

I tried removing those by hand. IFD0:ApplicationNotes could be removed, but didn't change anything. The image was then still reported as corrupt.
IFD0:ExifOffset could not be removed by hand with exiftool (it says "not writeable"). Does anyone has a tip how to remove it?

But as ExifOffset remains, I guess its whats causing the error and I guess its the content of the MakerNoteUnknownBinary.

Any Ideas how to check that?

Here are the exiftool -v outputs and diffs.
exif_meta_vs_no_meta_diff.log
exif_w_meta.log
exif_wo_app_note.log
exif_wo_meta.log

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the attached exiftool outputs and the sample Silverfast DNG files linked from the issue, then reproduce the rawspeed corruption failure. Trace which EXIF block causes parsing to fail; done means the affected DNG is decoded successfully without being reported as corrupt.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-vision
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.