Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pentax MakerNote duplication and invalid IFD #1757

Open
kmilos opened this issue Jul 1, 2021 · 3 comments
Open

Pentax MakerNote duplication and invalid IFD #1757

kmilos opened this issue Jul 1, 2021 · 3 comments

Comments

@kmilos
Copy link
Collaborator

kmilos commented Jul 1, 2021

Some sort of reincarnation of #533 is still present in v0.27.4, see https://discuss.pixls.us/t/invalid-tiff-directory-tags-are-not-sorted-in-ascending-order/25678

When exporting from dt, there seem to be two (incomplete) copies of the MakerNote and the messed up directory structure as a result. Only happens on the Pentax DNG input, but not on the PEF.

Tested on samples here (smaller ones).

@kmilos kmilos changed the title Pentax MakerNote duplication and Pentax MakerNote duplication and invalid IFD Jul 1, 2021
@kmilos
Copy link
Collaborator Author

kmilos commented Jul 1, 2021

Leaving dt out of the picture, if you do e.g. exiv2 -M"set Exif.Image.Copyright kmilos" on the DNG sample, the DNGPrivateData changes count significantly?

Original:

Exif.Image.DNGPrivateData Byte 160372 80 69 78 84 65 88 32 0 ...

After mod:

Exif.Image.DNGPrivateData Byte 131902 80 69 78 84 65 88 32 0 ...

@kmilos
Copy link
Collaborator Author

kmilos commented Jul 2, 2021

Looking at the diff of the two DNGs, indeed only the count for the DNGPrivateData (0xc634) was changed for some reason, the rest of the file is intact, i.e. no data was relocated:

image

@kmilos
Copy link
Collaborator Author

kmilos commented Jul 2, 2021

Ah, I now see that PentaxDng is also 0xc634, and is hence written over the DNGPrivateData w/ thumbnails removed after it was interpreted. Not cool.

As far as dt goes, I have a theory that somehow we end up there w/ two 0xc634 tags when exporting to TIFF, or we have the opposite situation where the smaller one gets overwritten w/ the larger original. Actually you want neither of them (0xc634 is exclusive to DNGs), but to instead convert the PentaxDng MakerNote to Pentax MakerNote somehow and write it as 0x927c inside Exif IFD...

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

No branches or pull requests

1 participant