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

Support Panasonic lens type in RW2 and JPG #201

Merged
merged 4 commits into from Jul 28, 2017
Merged

Support Panasonic lens type in RW2 and JPG #201

merged 4 commits into from Jul 28, 2017

Conversation

jonkerj
Copy link
Contributor

@jonkerj jonkerj commented Jul 27, 2017

LightZone does not handle Panasonic lens info stored in both RW2 and JPEGs very well. See #200. There are a couple of issues casuing this:

  • The specific EXIF TagID in Panasonic maker notes was not implemented yet
  • a bug in the maker note probe code prevents any maker note from being triggered at all
  • the offset, hardcoded in the Panasonic maker notes was incorrectly set, causing all more-than-4-byte values to be garbage (null in my case)
  • Panasonic camera's hide the maker notes only in the EXIF of an embedded thumbnail, not in the RW2 TIFF IFD.

I have fixed all four issues in the PR, and it seems to load RW2's and JPEG's correclt, with lens info. Added bonus: the exported JPEG's contain a proper XMP header for my lens.

It appeared all ASCII values in the panasonic maker notes appeared to be
''. Playing around with the offsets showed that this commit fixes this
issue for all my test files.
MakerNoteProbe uses (current) metadata, which at this point only
contains a preliminary placeholder. At the end of the EXIF processing,
this is merged into IFD0, which makes the data available for
MakerNoteProbe too. This commit introduces a EXIF IFD0 merge just before
the maker note is getting probed.
This is not the most elegant way to do this, but by far the easiest.
Better would be to lookup the IFD in the bytebuffer and put the
ExifMetadataReader to work. It seems to me that this involves a lot of
rework in the EXIF code, as it assumes all offsets to be absolute to the
beginning of the file, which is not the case when processing embedded
JPEGs.
@ktgw0316 ktgw0316 merged commit a0e4065 into ktgw0316:master Jul 28, 2017
@ktgw0316
Copy link
Owner

Thank you for the great work! 👍

@jonkerj jonkerj deleted the panasonic-lens-type branch July 28, 2017 11:16
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

Successfully merging this pull request may close these issues.

None yet

2 participants