Skip to content

Commit

Permalink
Add camera models for NikonFl3 makernotes group (#1994)
Browse files Browse the repository at this point in the history
* Add camera models for NikonFl3

* Python test for new NikonFl3 camera models
  • Loading branch information
postscript-dev authored Nov 8, 2021
1 parent 7c8e6fc commit 1ae9f42
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/makernote_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1139,6 +1139,8 @@ namespace Exiv2 {
{ 0x00a8, "0101", 0, 0, NA },
{ 0x00a8, "0102", 0, 1, NA },
{ 0x00a8, "0103", 0, 2, NA },
{ 0x00a8, "0104", 0, 2, NA },
{ 0x00a8, "0105", 0, 2, NA },
{ 0x00a8, "0107", 0, 3, NA },
{ 0x00a8, "0108", 0, 3, NA },
};
Expand Down
Binary file added test/data/pr_1994_poc1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/data/pr_1994_poc2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions tests/bugfixes/github/test_pr_1994.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-

import system_tests
from system_tests import CaseMeta, path

class TestAddModelsForNikonFl3(metaclass=CaseMeta):
"""
Enables NikonFl3 group to be used by more camera models
"""

filename1 = path("$data_path/pr_1994_poc1.jpg")
filename2 = path("$data_path/pr_1994_poc2.jpg")
commands = ["$exiv2 --grep NikonFl3 $filename1",
"$exiv2 --grep NikonFl3 $filename2"
]
stdout = ["""Exif.NikonFl3.Version Undefined 4 1.04
Exif.NikonFl3.FlashSource Byte 1 None
Exif.NikonFl3.ExternalFlashFirmware Short 1 n/a
Exif.NikonFl3.ExternalFlashFlags Byte 1 Fired
Exif.NikonFl3.FlashFocalLength Byte 1 n/a
Exif.NikonFl3.RepeatingFlashRate Byte 1 n/a
Exif.NikonFl3.RepeatingFlashCount Byte 1 n/a
Exif.NikonFl3.FlashGNDistance Byte 1 None
Exif.NikonFl3.FlashColorFilter Byte 1 None
""",
"""Exif.NikonFl3.Version Undefined 4 1.05
Exif.NikonFl3.FlashSource Byte 1 None
Exif.NikonFl3.ExternalFlashFirmware Short 1 n/a
Exif.NikonFl3.ExternalFlashFlags Byte 1 Fired
Exif.NikonFl3.FlashFocalLength Byte 1 n/a
Exif.NikonFl3.RepeatingFlashRate Byte 1 n/a
Exif.NikonFl3.RepeatingFlashCount Byte 1 n/a
Exif.NikonFl3.FlashGNDistance Byte 1 None
Exif.NikonFl3.FlashColorFilter Byte 1 None
"""]
stderr = [""]*2
retval = [0]*2

0 comments on commit 1ae9f42

Please sign in to comment.