commit
b7d76da9d5
@ -1251,6 +1251,7 @@ namespace Exiv2 {
|
||||
unsigned long lensID = 0x3ff;
|
||||
unsigned long index = 0;
|
||||
|
||||
// http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Pentax.html#LensData
|
||||
const ExifData::const_iterator lensInfo = metadata->findKey(ExifKey("Exif.PentaxDng.LensInfo")) != metadata->end()
|
||||
? metadata->findKey(ExifKey("Exif.PentaxDng.LensInfo"))
|
||||
: metadata->findKey(ExifKey("Exif.Pentax.LensInfo"))
|
||||
@ -1265,8 +1266,6 @@ namespace Exiv2 {
|
||||
// 0x0207 Pentax LensInfo Undefined 36 3 255 0 0 40 148 71 152 80 6 241 65 237 153 88 36 1 76 107 251 255 255 255 0 0 80 6 241 0 0 0 0 0 0 0 0
|
||||
unsigned long base = 1;
|
||||
|
||||
// http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Pentax.html#LensData
|
||||
const ExifData::const_iterator lensInfo = metadata->findKey(ExifKey("Exif.Pentax.LensInfo"));
|
||||
unsigned int autoAperture = lensInfo->toLong(base+1) & 0x01 ;
|
||||
unsigned int minAperture = lensInfo->toLong(base+2) & 0x06 ;
|
||||
unsigned int minFocusDistance = lensInfo->toLong(base+3) & 0xf8 ;
|
||||
|
||||
BIN
test/data/IMGP0020.exv
Normal file
BIN
test/data/IMGP0020.exv
Normal file
Binary file not shown.
21
tests/bugfixes/github/test_regression_issue_201.py
Normal file
21
tests/bugfixes/github/test_regression_issue_201.py
Normal file
@ -0,0 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import system_tests
|
||||
|
||||
|
||||
class ShadowingError(system_tests.Case):
|
||||
|
||||
commands = ["{exiv2} -PE {data_path}/IMGP0020.exv"]
|
||||
stdout = [""]
|
||||
stderr = [""]
|
||||
retval = [0]
|
||||
|
||||
def compare_stdout(self, i, command, got_stdout, expected_stdout):
|
||||
"""
|
||||
We only really care about the LensInfo line and that exiv2 does not
|
||||
crash, which the return value check also ensures.
|
||||
"""
|
||||
self.assertIn(
|
||||
"Exif.PentaxDng.LensInfo Undefined 69 131 0 0 255 0 40 148 111 65 69 6 238 65 78 153 80 40 1 73 107 251 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0",
|
||||
got_stdout
|
||||
)
|
||||
Loading…
Reference in New Issue
Block a user