From 2c9c3b2a7f876648d45b6cd55528380885c38c37 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Sun, 16 Apr 2017 18:52:26 +0200 Subject: [PATCH 1/3] Fix for fractional exposure time values, fixes #2081 --- rtengine/imagedata.cc | 2 +- rtexif/stdattribs.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rtengine/imagedata.cc b/rtengine/imagedata.cc index de5988d9b..0afe612b9 100644 --- a/rtengine/imagedata.cc +++ b/rtengine/imagedata.cc @@ -566,7 +566,7 @@ std::string ImageMetaData::shutterToString (double shutter) char buffer[256]; - if (shutter > 0.0 && shutter < 0.9) { + if (shutter > 0.0 && shutter <= 0.5) { sprintf (buffer, "1/%0.0f", 1.0 / shutter); } else { sprintf (buffer, "%0.1f", shutter); diff --git a/rtexif/stdattribs.cc b/rtexif/stdattribs.cc index ed8f97819..4dcea5622 100644 --- a/rtexif/stdattribs.cc +++ b/rtexif/stdattribs.cc @@ -389,7 +389,7 @@ public: char buffer[32]; double d = pow (2.0, -t->toDouble()); - if (d > 0.0 && d < 0.9) { + if (d > 0.0 && d <= 0.5) { sprintf (buffer, "1/%.0f", 1.0 / d); } else { sprintf (buffer, "%.1f", d); @@ -409,7 +409,7 @@ public: char buffer[32]; double d = t->toDouble(); - if (d > 0.0 && d < 0.9) { + if (d > 0.0 && d <= 0.5) { sprintf (buffer, "1/%.0f", 1.0 / d); } else { sprintf (buffer, "%.1f", d); From 34be802c928802cdee77347a3f89c64ff8c2b253 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sun, 16 Apr 2017 23:04:32 +0200 Subject: [PATCH 2/3] Fix wrong focal length for Pentax 645Z and Pentax K100D Super, as reported in #3654 --- rtexif/rtexif.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtexif/rtexif.cc b/rtexif/rtexif.cc index 58b60ee3f..30b094d64 100644 --- a/rtexif/rtexif.cc +++ b/rtexif/rtexif.cc @@ -977,7 +977,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) // There are 2 format pentaxLensDataAttribs int offsetFirst = 4; // LensInfo2 - if( strstr(model, "*ist") || strstr(model, "GX-1") || strstr(model, "K100D") || strstr(model, "K110D") ) { + if( strstr(model, "*ist") || strstr(model, "GX-1") || (strstr(model, "K100D") && !strstr(model, "K100D Super")) || strstr(model, "K110D") || strstr(model, "645Z")) { offsetFirst = 3; // LensInfo } else if( strstr(model, "645D") ) { offsetFirst = 13; // LensInfo3 From 931db7ab4efa9954dace09f291364fccc5900c9c Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sun, 16 Apr 2017 23:48:20 +0200 Subject: [PATCH 3/3] Fix wrong focal length for Pentax K200D, as reported in #3654 --- rtexif/rtexif.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtexif/rtexif.cc b/rtexif/rtexif.cc index 30b094d64..06651bf9e 100644 --- a/rtexif/rtexif.cc +++ b/rtexif/rtexif.cc @@ -977,7 +977,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) // There are 2 format pentaxLensDataAttribs int offsetFirst = 4; // LensInfo2 - if( strstr(model, "*ist") || strstr(model, "GX-1") || (strstr(model, "K100D") && !strstr(model, "K100D Super")) || strstr(model, "K110D") || strstr(model, "645Z")) { + if( strstr(model, "*ist") || strstr(model, "GX-1") || strstr(model, "K200D") || (strstr(model, "K100D") && !strstr(model, "K100D Super")) || strstr(model, "K110D") || strstr(model, "645Z")) { offsetFirst = 3; // LensInfo } else if( strstr(model, "645D") ) { offsetFirst = 13; // LensInfo3