Skip to content

Conversation

@FreddieWitherden
Copy link
Contributor

This small PR adds support for a missing tag in the Fuji Makernotes that I've discovered I need for my lens correction work. Details for the tag were taken from https://exiftool.org/TagNames/FujiFilm.html

Copy link
Collaborator

@kmilos kmilos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Translated values are incomplete?

@clanmills clanmills self-assigned this Nov 24, 2020
@clanmills clanmills added this to the v0.27.4 milestone Nov 24, 2020
@clanmills clanmills self-requested a review November 24, 2020 09:40
@FreddieWitherden
Copy link
Contributor Author

Translated values are incomplete?

Good spot. I have fixed the issue when the tag value is one.

As an aside, when this tag is 2 or 4 the image has an additional 1.25 crop factor attached to it. However, this does not appear to be reflected in the Exif.Photo.FocalLengthIn35mmFilm tag written out by the camera (it assumes the crop is 1.5 rather than 1.5*1.25). I am unsure how we want to handle this.

@kmilos kmilos self-requested a review November 24, 2020 15:08
@kmilos
Copy link
Collaborator

kmilos commented Nov 24, 2020

this does not appear to be reflected in the Exif.Photo.FocalLengthIn35mmFilm tag written out by the camera

It's not a job for Exiv2 to "fix" (hide) this IMHO.

@clanmills
Copy link
Collaborator

Let's try to minimise "interpreting" the metadata. It's like the lens recognition which should never have been in Exiv2. It has created end-less work. So, let's do as little as possible.

If you have to do this "when there is an R in the month, multiply by 1.25, you'll have to do it in code by supplying a specialised PrintFct. When we print the value (not the interpreted value), we print the value in the metadata.

@clanmills
Copy link
Collaborator

There is a PrintFnc already defined: print0xa405. We shouldn't touch this.

862 rmills@rmillsmbp:~/gnu/github/exiv2/0.27-maintenance/build $ exiv2 -pt -g 35  ~/Downloads/sample1.raf 
Exif.Photo.FocalLengthIn35mmFilm             Short       1  83.0 mm
863 rmills@rmillsmbp:~/gnu/github/exiv2/0.27-maintenance/build $ 

The tag is written by the manufacturer in Exif.Photo.FocalLengthIn35mmFilm. All the PrintFct does is to decorate the output:

    std::ostream& print0xa405(std::ostream& os, const Value& value, const ExifData*)
    {
        long length = value.toLong();
        if (length == 0) {
            os << _("Unknown");
        }
        else {
            os << length << ".0 mm";
        }
        return os;
    }

@clanmills clanmills merged commit 49fa54d into Exiv2:0.27-maintenance Nov 24, 2020
@clanmills
Copy link
Collaborator

Thanks you, Gentlemen for working on this.

@clanmills clanmills changed the title Add support for Fuji's CropMode tag. Add support for Fuji's CropMode tag (0.27->maintenance) Nov 26, 2020
@clanmills clanmills changed the title Add support for Fuji's CropMode tag (0.27->maintenance) Add support for Fuji's CropMode tag (0.27->master) Nov 26, 2020
@clanmills clanmills mentioned this pull request Jan 11, 2021
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.

3 participants