From 350b7b0808673bff28de6c6e89263c7a782b633d Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Sun, 11 Apr 2021 07:11:37 +0100 Subject: [PATCH 01/17] bump_v1.00_version --- CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e03e840b..5434be54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,12 +1,12 @@ cmake_minimum_required( VERSION 3.3.2 ) project(exiv2 # use TWEAK to categorize the build - VERSION 0.27.4.2 # 0.27.4 = GM (tagged and released) - # 0.27.4.9 = 27.4.9 Development - # 0.27.4.00 = GM Preview - # 0.27.4.2 = RC2 (tagged and released) - # 0.27.4.20 = RC2 Preview - # 0.27.4.29 = RC2 Development + VERSION 1.00.0.9 # 1.00.0 = GM (tagged and released) + # 1.00.0.9 = 1.00.0 Development + # 1.00.0.00 = GM Preview + # 1.00.0.2 = RC2 (tagged and released) + # 1.00.0.20 = RC2 Preview + # 1.00.0.29 = RC2 Development LANGUAGES CXX ) include(cmake/mainSetup.cmake REQUIRED) From bae33a1c3ad5a6995cbb9cb41f52675b31499ea2 Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Sun, 11 Apr 2021 08:04:21 +0100 Subject: [PATCH 02/17] Ubuntu 18.04 is failing because it's using python2! --- .travis.yml | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 91cda2fc..5db901b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,21 +26,22 @@ matrix: env: - BUILD_TYPE="Debug" - - name: "Ubuntu 18.04 - gcc (Release)" - os: linux - dist: bionic - sudo: required - compiler: gcc - env: - - BUILD_TYPE="Release" - - - name: "Ubuntu 18.04 - gcc (Debug)" - os: linux - dist: bionic - sudo: required - compiler: gcc - env: - - BUILD_TYPE="Debug" +# 18.04 fails because it uses python2 ! +# - name: "Ubuntu 18.04 - gcc (Release)" +# os: linux +# dist: bionic +# sudo: required +# compiler: gcc +# env: +# - BUILD_TYPE="Release" +# +# - name: "Ubuntu 18.04 - gcc (Debug)" +# os: linux +# dist: bionic +# sudo: required +# compiler: gcc +# env: +# - BUILD_TYPE="Debug" - name: "Ubuntu 20.04 - gcc (Release)" os: linux From c6be6c2b5e8950006f6fd21d32e7f1a9d087af93 Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Sun, 11 Apr 2021 11:17:18 +0100 Subject: [PATCH 03/17] fix_ci_ubuntu18.4 --- .travis.yml | 31 +++++++++++++++---------------- ci/install.sh | 28 ++++++++++------------------ 2 files changed, 25 insertions(+), 34 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5db901b2..91cda2fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,22 +26,21 @@ matrix: env: - BUILD_TYPE="Debug" -# 18.04 fails because it uses python2 ! -# - name: "Ubuntu 18.04 - gcc (Release)" -# os: linux -# dist: bionic -# sudo: required -# compiler: gcc -# env: -# - BUILD_TYPE="Release" -# -# - name: "Ubuntu 18.04 - gcc (Debug)" -# os: linux -# dist: bionic -# sudo: required -# compiler: gcc -# env: -# - BUILD_TYPE="Debug" + - name: "Ubuntu 18.04 - gcc (Release)" + os: linux + dist: bionic + sudo: required + compiler: gcc + env: + - BUILD_TYPE="Release" + + - name: "Ubuntu 18.04 - gcc (Debug)" + os: linux + dist: bionic + sudo: required + compiler: gcc + env: + - BUILD_TYPE="Debug" - name: "Ubuntu 20.04 - gcc (Release)" os: linux diff --git a/ci/install.sh b/ci/install.sh index 6d520d27..ac8af830 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -4,19 +4,10 @@ set -x # Prints every command # This file is only used from Travis CI, where the only Linux distro used is Ubuntu -python --version -python3 --version - if [[ "$(uname -s)" == 'Linux' ]]; then sudo apt-get update - sudo apt-get install cmake - if [[ "$(lsb_release -cs)" == 'focal' ]]; then - # In Ubuntu 20.04 python-pip does not exist. Furthermore we need to have the alias python for python3 - sudo apt-get install zlib1g-dev libssh-dev python3-pip python-is-python3 libxml2-utils - else - sudo apt-get install zlib1g-dev libssh-dev python-pip libxml2-utils - fi + sudo apt-get install zlib1g-dev libssh-dev python3-pip libxml2-utils if [ -n "$WITH_VALGRIND" ]; then sudo apt-get install valgrind @@ -27,15 +18,17 @@ if [[ "$(uname -s)" == 'Linux' ]]; then pip install conan==1.30.2 pip install codecov pip install lxml -else - sudo pip3 install virtualenv - virtualenv conan - source conan/bin/activate - pip3 install conan==1.30.2 - pip3 install codecov - pip3 install lxml fi +python3 --version + +sudo pip3 install virtualenv +virtualenv conan +source conan/bin/activate +pip3 install conan==1.30.2 +pip3 install codecov +pip3 install lxml + conan --version conan config set storage.path=~/conanData conan profile new default --detect @@ -43,4 +36,3 @@ conan profile new default --detect if [[ "$(uname -s)" == 'Linux' ]]; then conan profile update settings.compiler.libcxx=libstdc++11 default fi - From 677b02f35b29772a69725e9480399e7758103a16 Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Sun, 11 Apr 2021 12:03:00 +0100 Subject: [PATCH 04/17] Try 2. --- ci/install.sh | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/ci/install.sh b/ci/install.sh index ac8af830..d9cb5458 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -5,19 +5,12 @@ set -x # Prints every command # This file is only used from Travis CI, where the only Linux distro used is Ubuntu if [[ "$(uname -s)" == 'Linux' ]]; then - sudo apt-get update - sudo apt-get install cmake - sudo apt-get install zlib1g-dev libssh-dev python3-pip libxml2-utils - - if [ -n "$WITH_VALGRIND" ]; then - sudo apt-get install valgrind - fi - sudo pip install virtualenv - virtualenv conan - source conan/bin/activate - pip install conan==1.30.2 - pip install codecov - pip install lxml + sudo apt update --yes + sudo apt install --yes cmake + sudo apt install --yes zlib1g-dev libssh-dev python3-pip libxml2-utils + sudo apt install --yes valgrind + sudo apt autoremove --yes + sudo pip3 install --upgrade pip fi python3 --version From 512875dbbdd2d97b110b5dd10bd3a80d12ca87e0 Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Sun, 11 Apr 2021 12:34:19 +0100 Subject: [PATCH 05/17] Try 3. --- ci/install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ci/install.sh b/ci/install.sh index d9cb5458..9b14ce93 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -8,9 +8,10 @@ if [[ "$(uname -s)" == 'Linux' ]]; then sudo apt update --yes sudo apt install --yes cmake sudo apt install --yes zlib1g-dev libssh-dev python3-pip libxml2-utils - sudo apt install --yes valgrind + if [ -n "$WITH_VALGRIND" ]; then + sudo apt install --yes valgrind + fi sudo apt autoremove --yes - sudo pip3 install --upgrade pip fi python3 --version From ad99ded33335da32148b22823db976f1ae90aa5f Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Sun, 11 Apr 2021 13:45:33 +0100 Subject: [PATCH 06/17] Try 4. --- ci/install.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ci/install.sh b/ci/install.sh index 9b14ce93..874675df 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -4,6 +4,7 @@ set -x # Prints every command # This file is only used from Travis CI, where the only Linux distro used is Ubuntu +pip=pip3 if [[ "$(uname -s)" == 'Linux' ]]; then sudo apt update --yes sudo apt install --yes cmake @@ -12,17 +13,20 @@ if [[ "$(uname -s)" == 'Linux' ]]; then sudo apt install --yes valgrind fi sudo apt autoremove --yes + if [ -n "$WITH_VALGRIND" ]; then + sudo apt-get install valgrind + fi + pip=pip fi -python3 --version - -sudo pip3 install virtualenv +sudo $pip install virtualenv virtualenv conan source conan/bin/activate -pip3 install conan==1.30.2 -pip3 install codecov -pip3 install lxml +$pip3 install conan==1.30.2 +$pip3 install codecov +$pip3 install lxml +python3 --version conan --version conan config set storage.path=~/conanData conan profile new default --detect From 4bca4fc06b3b6104c0f04097807de3dcdccfc1be Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Sun, 11 Apr 2021 14:03:33 +0100 Subject: [PATCH 07/17] Give up. Restore original script and comment off/exclude 18.04 --- .travis.yml | 30 +++++++++++++++--------------- ci/install.sh | 42 ++++++++++++++++++++++++++---------------- 2 files changed, 41 insertions(+), 31 deletions(-) diff --git a/.travis.yml b/.travis.yml index 91cda2fc..550e42b5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,21 +26,21 @@ matrix: env: - BUILD_TYPE="Debug" - - name: "Ubuntu 18.04 - gcc (Release)" - os: linux - dist: bionic - sudo: required - compiler: gcc - env: - - BUILD_TYPE="Release" - - - name: "Ubuntu 18.04 - gcc (Debug)" - os: linux - dist: bionic - sudo: required - compiler: gcc - env: - - BUILD_TYPE="Debug" +# - name: "Ubuntu 18.04 - gcc (Release)" +# os: linux +# dist: bionic +# sudo: required +# compiler: gcc +# env: +# - BUILD_TYPE="Release" +# +# - name: "Ubuntu 18.04 - gcc (Debug)" +# os: linux +# dist: bionic +# sudo: required +# compiler: gcc +# env: +# - BUILD_TYPE="Debug" - name: "Ubuntu 20.04 - gcc (Release)" os: linux diff --git a/ci/install.sh b/ci/install.sh index 874675df..6d520d27 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -4,29 +4,38 @@ set -x # Prints every command # This file is only used from Travis CI, where the only Linux distro used is Ubuntu -pip=pip3 +python --version +python3 --version + if [[ "$(uname -s)" == 'Linux' ]]; then - sudo apt update --yes - sudo apt install --yes cmake - sudo apt install --yes zlib1g-dev libssh-dev python3-pip libxml2-utils - if [ -n "$WITH_VALGRIND" ]; then - sudo apt install --yes valgrind + sudo apt-get update + + sudo apt-get install cmake + if [[ "$(lsb_release -cs)" == 'focal' ]]; then + # In Ubuntu 20.04 python-pip does not exist. Furthermore we need to have the alias python for python3 + sudo apt-get install zlib1g-dev libssh-dev python3-pip python-is-python3 libxml2-utils + else + sudo apt-get install zlib1g-dev libssh-dev python-pip libxml2-utils fi - sudo apt autoremove --yes + if [ -n "$WITH_VALGRIND" ]; then sudo apt-get install valgrind fi - pip=pip + sudo pip install virtualenv + virtualenv conan + source conan/bin/activate + pip install conan==1.30.2 + pip install codecov + pip install lxml +else + sudo pip3 install virtualenv + virtualenv conan + source conan/bin/activate + pip3 install conan==1.30.2 + pip3 install codecov + pip3 install lxml fi -sudo $pip install virtualenv -virtualenv conan -source conan/bin/activate -$pip3 install conan==1.30.2 -$pip3 install codecov -$pip3 install lxml - -python3 --version conan --version conan config set storage.path=~/conanData conan profile new default --detect @@ -34,3 +43,4 @@ conan profile new default --detect if [[ "$(uname -s)" == 'Linux' ]]; then conan profile update settings.compiler.libcxx=libstdc++11 default fi + From 6fb7a0f9d5995be5a7bb210c8a26d8cb130f25e2 Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Sun, 11 Apr 2021 14:30:01 +0100 Subject: [PATCH 08/17] I thought the 18.04 request was commented off. Apparently not. Throw it away. Shshshssssss. FFfffff. --- .travis.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 550e42b5..8ddf2bea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,22 +26,6 @@ matrix: env: - BUILD_TYPE="Debug" -# - name: "Ubuntu 18.04 - gcc (Release)" -# os: linux -# dist: bionic -# sudo: required -# compiler: gcc -# env: -# - BUILD_TYPE="Release" -# -# - name: "Ubuntu 18.04 - gcc (Debug)" -# os: linux -# dist: bionic -# sudo: required -# compiler: gcc -# env: -# - BUILD_TYPE="Debug" - - name: "Ubuntu 20.04 - gcc (Release)" os: linux dist: focal From 376ee55e7acefaf7a12ed9009c57011802072fc1 Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Sun, 11 Apr 2021 14:57:07 +0100 Subject: [PATCH 09/17] Commented off code was good. WebUI confused me. Manually go back (apparently no reverse gear on git). --- .travis.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.travis.yml b/.travis.yml index 8ddf2bea..550e42b5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,22 @@ matrix: env: - BUILD_TYPE="Debug" +# - name: "Ubuntu 18.04 - gcc (Release)" +# os: linux +# dist: bionic +# sudo: required +# compiler: gcc +# env: +# - BUILD_TYPE="Release" +# +# - name: "Ubuntu 18.04 - gcc (Debug)" +# os: linux +# dist: bionic +# sudo: required +# compiler: gcc +# env: +# - BUILD_TYPE="Debug" + - name: "Ubuntu 20.04 - gcc (Release)" os: linux dist: focal From e6fb385f10e3b9d935622f26652b8c7c72ecdfd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= <4973094+kmilos@users.noreply.github.com> Date: Mon, 12 Apr 2021 13:03:50 +0200 Subject: [PATCH 10/17] Add Exif Gamma tag --- src/tags_int.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tags_int.cpp b/src/tags_int.cpp index 4c8cc7f5..923dc2b4 100644 --- a/src/tags_int.cpp +++ b/src/tags_int.cpp @@ -2081,6 +2081,11 @@ namespace Exiv2 { TagInfo(0xa462, "SourceExposureTimesOfCompositeImage", N_("Source Exposure Times Of Composite Image"), N_("For a composite image, records the parameters relating exposure time of the exposures for generating the said composite image, such as respective exposure times of captured source images (tentatively recorded images)."), exifId, captureCond, undefined, 0, printValue), // Exif 2.32 + TagInfo(0xa500, "Gamma", N_("Gamma"), + N_("Indicates the value of coefficient gamma. The formula of transfer function used for image reproduction " + "is expressed as follows: (reproduced value) = (input value)^gamma. Both reproduced value and input value " + "indicate normalized value, whose minimum value is 0 and maximum value is 1."), + exifId, imgCharacter, unsignedRational, 1, printFloat), // End of list marker TagInfo(0xffff, "(UnknownExifTag)", N_("Unknown Exif tag"), N_("Unknown Exif tag"), From b621033921aac7cd81a2933824ec29af77033219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Mon, 12 Apr 2021 17:13:36 +0200 Subject: [PATCH 11/17] Update Gamma tests --- test/data/exifdata-test.out | 8 ++++---- test/data/exiv2-test.out | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/data/exifdata-test.out b/test/data/exifdata-test.out index 29d74262..b3a5467d 100644 --- a/test/data/exifdata-test.out +++ b/test/data/exifdata-test.out @@ -845,7 +845,7 @@ Exif.Photo.Contrast 0xa408 Exif Short 1 Exif.Photo.Saturation 0xa409 Exif Short 1 0 Exif.Photo.Sharpness 0xa40a Exif Short 1 0 Exif.Photo.SubjectDistanceRange 0xa40c Exif Short 1 0 -Exif.Photo.0xa500 0xa500 Exif Rational 1 22/10 +Exif.Photo.Gamma 0xa500 Exif Rational 1 22/10 Exif.Thumbnail.Compression 0x0103 IFD1 Short 1 6 Exif.Thumbnail.XResolution 0x011a IFD1 Rational 1 300/1 Exif.Thumbnail.YResolution 0x011b IFD1 Rational 1 300/1 @@ -1016,7 +1016,7 @@ Exif.Photo.Contrast 0xa408 Exif Short 1 Exif.Photo.Saturation 0xa409 Exif Short 1 0 Exif.Photo.Sharpness 0xa40a Exif Short 1 0 Exif.Photo.SubjectDistanceRange 0xa40c Exif Short 1 0 -Exif.Photo.0xa500 0xa500 Exif Rational 1 22/10 +Exif.Photo.Gamma 0xa500 Exif Rational 1 22/10 Exif.Thumbnail.Compression 0x0103 IFD1 Short 1 6 Exif.Thumbnail.Orientation 0x0112 IFD1 Short 5 2 3 4 5 6 Exif.Thumbnail.XResolution 0x011a IFD1 Rational 1 300/1 @@ -1188,7 +1188,7 @@ Exif.Photo.Contrast 0xa408 Exif Short 1 Exif.Photo.Saturation 0xa409 Exif Short 1 0 Exif.Photo.Sharpness 0xa40a Exif Short 1 0 Exif.Photo.SubjectDistanceRange 0xa40c Exif Short 1 0 -Exif.Photo.0xa500 0xa500 Exif Rational 1 22/10 +Exif.Photo.Gamma 0xa500 Exif Rational 1 22/10 Exif.Thumbnail.Compression 0x0103 IFD1 Short 1 6 Exif.Thumbnail.Orientation 0x0112 IFD1 Short 1 2 Exif.Thumbnail.XResolution 0x011a IFD1 Rational 1 300/1 @@ -1360,7 +1360,7 @@ Exif.Photo.Contrast 0xa408 Exif Short 1 Exif.Photo.Saturation 0xa409 Exif Short 1 0 Exif.Photo.Sharpness 0xa40a Exif Short 1 0 Exif.Photo.SubjectDistanceRange 0xa40c Exif Short 1 0 -Exif.Photo.0xa500 0xa500 Exif Rational 1 22/10 +Exif.Photo.Gamma 0xa500 Exif Rational 1 22/10 Exif.Thumbnail.Compression 0x0103 IFD1 Short 1 6 Exif.Thumbnail.Orientation 0x0112 IFD1 Short 1 2 Exif.Thumbnail.XResolution 0x011a IFD1 Rational 1 300/1 diff --git a/test/data/exiv2-test.out b/test/data/exiv2-test.out index 35271101..f4ef1a5a 100644 --- a/test/data/exiv2-test.out +++ b/test/data/exiv2-test.out @@ -976,7 +976,7 @@ File 4/16: 20040329_224245.jpg 20040329_224245.jpg Exif.Photo.Saturation Short 1 Normal 20040329_224245.jpg Exif.Photo.Sharpness Short 1 Normal 20040329_224245.jpg Exif.Photo.SubjectDistanceRange Short 1 Unknown -20040329_224245.jpg Exif.Photo.0xa500 Rational 1 22/10 +20040329_224245.jpg Exif.Photo.Gamma Rational 1 2.2 20040329_224245.jpg Exif.Thumbnail.Compression Short 1 JPEG (old-style) 20040329_224245.jpg Exif.Thumbnail.XResolution Rational 1 300 20040329_224245.jpg Exif.Thumbnail.YResolution Rational 1 300 @@ -2617,7 +2617,7 @@ Compare image data and extracted data ------------------------------------ < 20040329_224245.jpg Exif.Photo.Saturation Short 1 Normal < 20040329_224245.jpg Exif.Photo.Sharpness Short 1 Normal < 20040329_224245.jpg Exif.Photo.SubjectDistanceRange Short 1 Unknown -< 20040329_224245.jpg Exif.Photo.0xa500 Rational 1 22/10 +< 20040329_224245.jpg Exif.Photo.Gamma Rational 1 2.2 < 20040329_224245.jpg Exif.Thumbnail.Compression Short 1 JPEG (old-style) < 20040329_224245.jpg Exif.Thumbnail.XResolution Rational 1 300 < 20040329_224245.jpg Exif.Thumbnail.YResolution Rational 1 300 @@ -4180,7 +4180,7 @@ Compare image data and extracted data ------------------------------------ > 20040329_224245.exv Exif.Photo.Saturation Short 1 Normal > 20040329_224245.exv Exif.Photo.Sharpness Short 1 Normal > 20040329_224245.exv Exif.Photo.SubjectDistanceRange Short 1 Unknown -> 20040329_224245.exv Exif.Photo.0xa500 Rational 1 22/10 +> 20040329_224245.exv Exif.Photo.Gamma Rational 1 2.2 > 20040329_224245.exv Exif.Thumbnail.Compression Short 1 JPEG (old-style) > 20040329_224245.exv Exif.Thumbnail.XResolution Rational 1 300 > 20040329_224245.exv Exif.Thumbnail.YResolution Rational 1 300 @@ -5981,7 +5981,7 @@ Compare original and inserted image data --------------------------------- < 20040329_224245.jpg Exif.Photo.Saturation Short 1 Normal < 20040329_224245.jpg Exif.Photo.Sharpness Short 1 Normal < 20040329_224245.jpg Exif.Photo.SubjectDistanceRange Short 1 Unknown -< 20040329_224245.jpg Exif.Photo.0xa500 Rational 1 22/10 +< 20040329_224245.jpg Exif.Photo.Gamma Rational 1 2.2 < 20040329_224245.jpg Exif.Thumbnail.Compression Short 1 JPEG (old-style) < 20040329_224245.jpg Exif.Thumbnail.XResolution Rational 1 300 < 20040329_224245.jpg Exif.Thumbnail.YResolution Rational 1 300 @@ -7544,7 +7544,7 @@ Compare original and inserted image data --------------------------------- > 20040329_224245.exv Exif.Photo.Saturation Short 1 Normal > 20040329_224245.exv Exif.Photo.Sharpness Short 1 Normal > 20040329_224245.exv Exif.Photo.SubjectDistanceRange Short 1 Unknown -> 20040329_224245.exv Exif.Photo.0xa500 Rational 1 22/10 +> 20040329_224245.exv Exif.Photo.Gamma Rational 1 2.2 > 20040329_224245.exv Exif.Thumbnail.Compression Short 1 JPEG (old-style) > 20040329_224245.exv Exif.Thumbnail.XResolution Rational 1 300 > 20040329_224245.exv Exif.Thumbnail.YResolution Rational 1 300 From bdd23ae3284903366f3025cfb3e10c761e173c2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Tue, 13 Apr 2021 17:22:34 +0200 Subject: [PATCH 12/17] Improve printing of GPS info --- src/tags_int.cpp | 36 +++++++++++------------ test/data/geotag-test.out | 8 ++--- tests/bugfixes/github/test_issue_1046.py | 4 +-- tests/bugfixes/redmine/test_issue_1024.py | 4 +-- tests/bugfixes/redmine/test_issue_1137.py | 4 +-- tests/bugfixes/redmine/test_issue_528.py | 4 +-- 6 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/tags_int.cpp b/src/tags_int.cpp index 923dc2b4..55d80b82 100644 --- a/src/tags_int.cpp +++ b/src/tags_int.cpp @@ -2117,14 +2117,14 @@ namespace Exiv2 { //! GPS status, tag 0x0009 extern const TagDetails exifGPSStatus[] = { - { 'A', N_("Measurement in progress") }, - { 'V', N_("Measurement Interoperability") } + { 'A', N_("Measurement in progress") }, + { 'V', N_("Measurement interrupted") } }; //! GPS measurement mode, tag 0x000a extern const TagDetails exifGPSMeasureMode[] = { - { '2', N_("Two-dimensional measurement") }, - { '3', N_("Three-dimensional measurement") } + { '2', N_("2-dimensional measurement") }, + { '3', N_("3-dimensional measurement") } }; //! GPS speed reference, tag 0x000c @@ -2134,20 +2134,20 @@ namespace Exiv2 { { 'N', N_("knots") } }; - //! GPS direction ref, tags 0x000e, 0x0010, 0x0017 + //! GPS direction reference, tags 0x000e, 0x0010, 0x0017 extern const TagDetails exifGPSDirRef[] = { { 'T', N_("True direction") }, { 'M', N_("Magnetic direction") } }; - //! GPS Destination distance ref, tag 0x0019 + //! GPS destination distance reference, tag 0x0019 extern const TagDetails exifGPSDestDistanceRef[] = { - { 'K', N_("Kilometers") }, - { 'M', N_("Miles") }, - { 'N', N_("Knots") } + { 'K', N_("km") }, + { 'M', N_("miles") }, + { 'N', N_("nautical miles") } }; - //! GPS Differential, tag 0x001e + //! GPS differential correction, tag 0x001e extern const TagDetails exifGPSDifferential[] = { { 0, N_("Without correction") }, { 1, N_("Correction applied") } @@ -2222,14 +2222,14 @@ namespace Exiv2 { TagInfo(0x000b, "GPSDOP", N_("GPS Data Degree of Precision"), N_("Indicates the GPS DOP (data degree of precision). An HDOP value is written " "during two-dimensional measurement, and PDOP during three-dimensional measurement."), - gpsId, gpsTags, unsignedRational, 1, printValue), + gpsId, gpsTags, unsignedRational, 1, printFloat), TagInfo(0x000c, "GPSSpeedRef", N_("GPS Speed Reference"), N_("Indicates the unit used to express the GPS receiver speed of movement. " "\"K\" \"M\" and \"N\" represents kilometers per hour, miles per hour, and knots."), gpsId, gpsTags, asciiString, 2, print0x000c), TagInfo(0x000d, "GPSSpeed", N_("GPS Speed"), N_("Indicates the speed of GPS receiver movement."), - gpsId, gpsTags, unsignedRational, 1, printValue), + gpsId, gpsTags, unsignedRational, 1, printFloat), TagInfo(0x000e, "GPSTrackRef", N_("GPS Track Ref"), N_("Indicates the reference for giving the direction of GPS receiver movement. " "\"T\" denotes true direction and \"M\" is magnetic direction."), @@ -2237,7 +2237,7 @@ namespace Exiv2 { TagInfo(0x000f, "GPSTrack", N_("GPS Track"), N_("Indicates the direction of GPS receiver movement. The range of values is " "from 0.00 to 359.99."), - gpsId, gpsTags, unsignedRational, 1, printValue), + gpsId, gpsTags, unsignedRational, 1, printFloat), TagInfo(0x0010, "GPSImgDirectionRef", N_("GPS Image Direction Reference"), N_("Indicates the reference for giving the direction of the image when it is captured. " "\"T\" denotes true direction and \"M\" is magnetic direction."), @@ -2245,7 +2245,7 @@ namespace Exiv2 { TagInfo(0x0011, "GPSImgDirection", N_("GPS Image Direction"), N_("Indicates the direction of the image when it was captured. The range of values " "is from 0.00 to 359.99."), - gpsId, gpsTags, unsignedRational, 1, printValue), + gpsId, gpsTags, unsignedRational, 1, printFloat), TagInfo(0x0012, "GPSMapDatum", N_("GPS Map Datum"), N_("Indicates the geodetic survey data used by the GPS receiver. If the survey data " "is restricted to Japan, the value of this tag is \"TOKYO\" or \"WGS-84\"."), @@ -2280,14 +2280,14 @@ namespace Exiv2 { TagInfo(0x0018, "GPSDestBearing", N_("GPS Destination Bearing"), N_("Indicates the bearing to the destination point. The range of values is from " "0.00 to 359.99."), - gpsId, gpsTags, unsignedRational, 1, printValue), + gpsId, gpsTags, unsignedRational, 1, printFloat), TagInfo(0x0019, "GPSDestDistanceRef", N_("GPS Destination Distance Reference"), N_("Indicates the unit used to express the distance to the destination point. " "\"K\", \"M\" and \"N\" represent kilometers, miles and knots."), gpsId, gpsTags, asciiString, 2, print0x0019), TagInfo(0x001a, "GPSDestDistance", N_("GPS Destination Distance"), N_("Indicates the distance to the destination point."), - gpsId, gpsTags, unsignedRational, 1, printValue), + gpsId, gpsTags, unsignedRational, 1, printFloat), TagInfo(0x001b, "GPSProcessingMethod", N_("GPS Processing Method"), N_("A character string recording the name of the method used for location finding. " "The string encoding is defined using the same scheme as UserComment."), @@ -2305,7 +2305,7 @@ namespace Exiv2 { gpsId, gpsTags, unsignedShort, 1, print0x001e), TagInfo(0x001f, "GPSHPositioningError", N_("GPS Horizontal positioning error"), N_("This tag indicates horizontal positioning errors in meters."), - gpsId, gpsTags, unsignedRational, 1, printValue), + gpsId, gpsTags, unsignedRational, 1, printFloat), // End of list marker TagInfo(0xffff, "(UnknownGpsTag)", N_("Unknown GPSInfo tag"), N_("Unknown GPSInfo tag"), @@ -2625,7 +2625,7 @@ namespace Exiv2 { { std::ios::fmtflags f( os.flags() ); if (value.count() == 3) { - static const char* unit[] = { "deg", "'", "\"" }; + static const char* unit[] = { " deg", "'", "\"" }; for (int i = 0; i < value.count() ; ++i) { const int v = (int) (value.toFloat(i)+0.5f); // nearest integer os << (i != 0? " " : "") << v << unit[i]; diff --git a/test/data/geotag-test.out b/test/data/geotag-test.out index 081f2582..677bf338 100644 --- a/test/data/geotag-test.out +++ b/test/data/geotag-test.out @@ -1,9 +1,9 @@ --- show GPSInfo tags --- Exif.GPSInfo.GPSVersionID Byte 4 2.2.0.0 Exif.GPSInfo.GPSLatitudeRef Ascii 2 North -Exif.GPSInfo.GPSLatitude Rational 3 36deg 26' 54" +Exif.GPSInfo.GPSLatitude Rational 3 36 deg 26' 54" Exif.GPSInfo.GPSLongitudeRef Ascii 2 West -Exif.GPSInfo.GPSLongitude Rational 3 116deg 51' 18" +Exif.GPSInfo.GPSLongitude Rational 3 116 deg 51' 18" Exif.GPSInfo.GPSAltitudeRef Byte 1 Below sea level Exif.GPSInfo.GPSAltitude Rational 1 14.3 m Exif.GPSInfo.GPSTimeStamp Rational 3 09:54:28 @@ -16,9 +16,9 @@ Exif.GPSInfo.GPSDateStamp Ascii 20 2008:05:08 09:54:28 --- show GPSInfo tags --- Exif.GPSInfo.GPSVersionID Byte 4 2.2.0.0 Exif.GPSInfo.GPSLatitudeRef Ascii 2 North -Exif.GPSInfo.GPSLatitude Rational 3 36deg 26' 54" +Exif.GPSInfo.GPSLatitude Rational 3 36 deg 26' 54" Exif.GPSInfo.GPSLongitudeRef Ascii 2 West -Exif.GPSInfo.GPSLongitude Rational 3 116deg 51' 18" +Exif.GPSInfo.GPSLongitude Rational 3 116 deg 51' 18" Exif.GPSInfo.GPSAltitudeRef Byte 1 Below sea level Exif.GPSInfo.GPSAltitude Rational 1 14.3 m Exif.GPSInfo.GPSTimeStamp Rational 3 09:54:28 diff --git a/tests/bugfixes/github/test_issue_1046.py b/tests/bugfixes/github/test_issue_1046.py index 347a4375..f1a2509a 100644 --- a/tests/bugfixes/github/test_issue_1046.py +++ b/tests/bugfixes/github/test_issue_1046.py @@ -26,9 +26,9 @@ class test_issue_1046Test(metaclass=CaseMeta): stdout = ["""Exif.Photo.UserComment Undefined 12 charset=Unicode AB Exif.GPSInfo.GPSVersionID Byte 4 2.2.0.0 Exif.GPSInfo.GPSLatitudeRef Ascii 2 North -Exif.GPSInfo.GPSLatitude Rational 3 51deg 23' 13" +Exif.GPSInfo.GPSLatitude Rational 3 51 deg 23' 13" Exif.GPSInfo.GPSLongitudeRef Ascii 2 West -Exif.GPSInfo.GPSLongitude Rational 3 0deg 44' 27" +Exif.GPSInfo.GPSLongitude Rational 3 0 deg 44' 27" Exif.GPSInfo.GPSAltitudeRef Byte 1 Above sea level Exif.GPSInfo.GPSAltitude Rational 1 104.2 m Exif.GPSInfo.GPSTimeStamp Rational 3 10:34:11 diff --git a/tests/bugfixes/redmine/test_issue_1024.py b/tests/bugfixes/redmine/test_issue_1024.py index d98d530d..07a83209 100644 --- a/tests/bugfixes/redmine/test_issue_1024.py +++ b/tests/bugfixes/redmine/test_issue_1024.py @@ -10,9 +10,9 @@ class CheckRegularExpressionSupport(metaclass=system_tests.CaseMeta): commands = [ "$exiv2 -pa --grep gpsl/i $filename" ] stdout = [ """Exif.GPSInfo.GPSLatitudeRef Ascii 2 North -Exif.GPSInfo.GPSLatitude Rational 3 52deg 4' 0" +Exif.GPSInfo.GPSLatitude Rational 3 52 deg 4' 0" Exif.GPSInfo.GPSLongitudeRef Ascii 2 East -Exif.GPSInfo.GPSLongitude Rational 3 1deg 14' 0" +Exif.GPSInfo.GPSLongitude Rational 3 1 deg 14' 0" """ ] stderr = [""] diff --git a/tests/bugfixes/redmine/test_issue_1137.py b/tests/bugfixes/redmine/test_issue_1137.py index 8cdecf71..51b30d48 100644 --- a/tests/bugfixes/redmine/test_issue_1137.py +++ b/tests/bugfixes/redmine/test_issue_1137.py @@ -36,8 +36,8 @@ set Exif.GPSInfo.GPSLongitude 1/1 495984/10000 0/1 output_grep_GPSL, "", """Exif.GPSInfo.GPSLatitudeRef Ascii 2 North -Exif.GPSInfo.GPSLatitude Rational 3 51deg 11' 0" +Exif.GPSInfo.GPSLatitude Rational 3 51 deg 11' 0" Exif.GPSInfo.GPSLongitudeRef Ascii 2 West -Exif.GPSInfo.GPSLongitude Rational 3 1deg 50' 0" +Exif.GPSInfo.GPSLongitude Rational 3 1 deg 50' 0" """ ] diff --git a/tests/bugfixes/redmine/test_issue_528.py b/tests/bugfixes/redmine/test_issue_528.py index b7ce0e8a..c3012eff 100644 --- a/tests/bugfixes/redmine/test_issue_528.py +++ b/tests/bugfixes/redmine/test_issue_528.py @@ -69,9 +69,9 @@ Exif.Photo.Saturation Short 1 Normal Exif.Image.GPSTag Long 1 870 Exif.GPSInfo.GPSVersionID Byte 4 2.0.0.0 Exif.GPSInfo.GPSLatitudeRef Ascii 2 North -Exif.GPSInfo.GPSLatitude Rational 3 47deg 36' 58" +Exif.GPSInfo.GPSLatitude Rational 3 47 deg 36' 58" Exif.GPSInfo.GPSLongitudeRef Ascii 2 East -Exif.GPSInfo.GPSLongitude Rational 3 1deg 31' 1" +Exif.GPSInfo.GPSLongitude Rational 3 1 deg 31' 1" Exif.GPSInfo.GPSAltitudeRef Byte 1 Above sea level Exif.GPSInfo.GPSAltitude Rational 1 86 m Exif.Thumbnail.Compression Short 1 JPEG (old-style) From 77d31037eb9ec31f789b5ac16ea59b2b78113bb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Wed, 14 Apr 2021 11:53:35 +0200 Subject: [PATCH 13/17] Improve precision of GPS lat/lon printed values --- src/tags_int.cpp | 29 +++++++++++++++++++---- tests/bugfixes/redmine/test_issue_1024.py | 4 ++-- tests/bugfixes/redmine/test_issue_1137.py | 4 ++-- tests/bugfixes/redmine/test_issue_528.py | 4 ++-- 4 files changed, 30 insertions(+), 11 deletions(-) diff --git a/src/tags_int.cpp b/src/tags_int.cpp index 55d80b82..8150c4a9 100644 --- a/src/tags_int.cpp +++ b/src/tags_int.cpp @@ -2625,14 +2625,33 @@ namespace Exiv2 { { std::ios::fmtflags f( os.flags() ); if (value.count() == 3) { - static const char* unit[] = { " deg", "'", "\"" }; - for (int i = 0; i < value.count() ; ++i) { - const int v = (int) (value.toFloat(i)+0.5f); // nearest integer - os << (i != 0? " " : "") << v << unit[i]; + Rational deg = value.toRational(0); + Rational min = value.toRational(1); + Rational sec = value.toRational(2); + if ((deg.second != 1) || (min.second == 0) || (sec.second == 0)) { + return os << "(" << value << ")"; } + const int32_t dd = deg.first; + const int32_t mm = min.first / min.second; + const int32_t rem = min.first % min.second; + if ((min.second > 1) && (rem > 0)) { + if ((sec.first == 0) && (sec.second == 1)) { + sec.first = 60 * rem; + sec.second = min.second; + } else { + return os << "(" << value << ")"; + } + } + const float ss = (float)sec.first / sec.second; + os << dd << " deg "; + os << mm << "' "; + std::ostringstream oss; + oss.copyfmt(os); + os << std::fixed << std::setprecision(sec.second > 1 ? 2 : 0) << ss << "\""; + os.copyfmt(oss); } else { - os << value; + os << "(" << value << ")"; } os.flags(f); return os; diff --git a/tests/bugfixes/redmine/test_issue_1024.py b/tests/bugfixes/redmine/test_issue_1024.py index 07a83209..8a3a3ac4 100644 --- a/tests/bugfixes/redmine/test_issue_1024.py +++ b/tests/bugfixes/redmine/test_issue_1024.py @@ -10,9 +10,9 @@ class CheckRegularExpressionSupport(metaclass=system_tests.CaseMeta): commands = [ "$exiv2 -pa --grep gpsl/i $filename" ] stdout = [ """Exif.GPSInfo.GPSLatitudeRef Ascii 2 North -Exif.GPSInfo.GPSLatitude Rational 3 52 deg 4' 0" +Exif.GPSInfo.GPSLatitude Rational 3 52 deg 3' 49.02" Exif.GPSInfo.GPSLongitudeRef Ascii 2 East -Exif.GPSInfo.GPSLongitude Rational 3 1 deg 14' 0" +Exif.GPSInfo.GPSLongitude Rational 3 1 deg 13' 49.16" """ ] stderr = [""] diff --git a/tests/bugfixes/redmine/test_issue_1137.py b/tests/bugfixes/redmine/test_issue_1137.py index 51b30d48..d6d0293e 100644 --- a/tests/bugfixes/redmine/test_issue_1137.py +++ b/tests/bugfixes/redmine/test_issue_1137.py @@ -36,8 +36,8 @@ set Exif.GPSInfo.GPSLongitude 1/1 495984/10000 0/1 output_grep_GPSL, "", """Exif.GPSInfo.GPSLatitudeRef Ascii 2 North -Exif.GPSInfo.GPSLatitude Rational 3 51 deg 11' 0" +Exif.GPSInfo.GPSLatitude Rational 3 51 deg 10' 41.81" Exif.GPSInfo.GPSLongitudeRef Ascii 2 West -Exif.GPSInfo.GPSLongitude Rational 3 1 deg 50' 0" +Exif.GPSInfo.GPSLongitude Rational 3 1 deg 49' 35.90" """ ] diff --git a/tests/bugfixes/redmine/test_issue_528.py b/tests/bugfixes/redmine/test_issue_528.py index c3012eff..635fa9d3 100644 --- a/tests/bugfixes/redmine/test_issue_528.py +++ b/tests/bugfixes/redmine/test_issue_528.py @@ -69,9 +69,9 @@ Exif.Photo.Saturation Short 1 Normal Exif.Image.GPSTag Long 1 870 Exif.GPSInfo.GPSVersionID Byte 4 2.0.0.0 Exif.GPSInfo.GPSLatitudeRef Ascii 2 North -Exif.GPSInfo.GPSLatitude Rational 3 47 deg 36' 58" +Exif.GPSInfo.GPSLatitude Rational 3 47 deg 36' 58.02" Exif.GPSInfo.GPSLongitudeRef Ascii 2 East -Exif.GPSInfo.GPSLongitude Rational 3 1 deg 31' 1" +Exif.GPSInfo.GPSLongitude Rational 3 1 deg 31' 0.94" Exif.GPSInfo.GPSAltitudeRef Byte 1 Above sea level Exif.GPSInfo.GPSAltitude Rational 1 86 m Exif.Thumbnail.Compression Short 1 JPEG (old-style) From 9fa0dbc1c9e0ea42e63b610866551de6ea7178e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= <4973094+kmilos@users.noreply.github.com> Date: Wed, 14 Apr 2021 12:47:09 +0200 Subject: [PATCH 14/17] Correct GDS distance unit in description knot is a measure of speed... --- src/tags_int.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tags_int.cpp b/src/tags_int.cpp index 8150c4a9..1921c287 100644 --- a/src/tags_int.cpp +++ b/src/tags_int.cpp @@ -2283,7 +2283,7 @@ namespace Exiv2 { gpsId, gpsTags, unsignedRational, 1, printFloat), TagInfo(0x0019, "GPSDestDistanceRef", N_("GPS Destination Distance Reference"), N_("Indicates the unit used to express the distance to the destination point. " - "\"K\", \"M\" and \"N\" represent kilometers, miles and knots."), + "\"K\", \"M\" and \"N\" represent kilometers, miles and nautical miles."), gpsId, gpsTags, asciiString, 2, print0x0019), TagInfo(0x001a, "GPSDestDistance", N_("GPS Destination Distance"), N_("Indicates the distance to the destination point."), From b09019c63611494b376e793a07773d173c84c1a2 Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Wed, 14 Apr 2021 16:21:50 +0100 Subject: [PATCH 15/17] fix_enableBMFF_v1 --- CMakeLists.txt | 2 +- README.md | 4 ++-- include/exiv2/exiv2.hpp | 2 -- src/CMakeLists.txt | 8 +++----- src/bmffimage.cpp | 21 ++++++++++++++------- 5 files changed, 20 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5434be54..e4154af7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,7 @@ option( EXIV2_ENABLE_WIN_UNICODE "Use Unicode paths (wstring) on Windows" option( EXIV2_ENABLE_WEBREADY "Build webready support into library" OFF ) option( EXIV2_ENABLE_CURL "USE Libcurl for HttpIo (WEBREADY)" OFF ) option( EXIV2_ENABLE_SSH "USE Libssh for SshIo (WEBREADY)" OFF ) -option( EXIV2_ENABLE_BMFF "Build with BMFF support" OFF ) +option( EXIV2_ENABLE_BMFF "Build with BMFF support" ON ) option( EXIV2_BUILD_SAMPLES "Build sample applications" ON ) option( EXIV2_BUILD_EXIV2_COMMAND "Build exiv2 command-line executable" ON ) diff --git a/README.md b/README.md index ce6a2ba1..af5d02ba 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,7 @@ option( EXIV2_ENABLE_XMP "Build with XMP metadata support" ON option( EXIV2_ENABLE_EXTERNAL_XMP "Use external version of XMP" OFF ) option( EXIV2_ENABLE_PNG "Build with png support (requires libz)" ON ) ... -option( EXIV2_ENABLE_BMFF "Build with BMFF support" OFF ) +option( EXIV2_ENABLE_BMFF "Build with BMFF support" ON ) 577 rmills@rmillsmm:~/gnu/github/exiv2/exiv2 $ ``` @@ -786,7 +786,7 @@ Access to the bmff code is guarded in two ways. Firstly, you have to build the EXIV2API bool enableBMFF(bool enable); ``` -The return value from `enableBMFF()` reports the current status of bmff support before calling this function. +The return value from `enableBMFF()` is true if the library has been build with bmff support (cmake option -DEXIV2_ANABLE_BMFF=On). Applications may wish to provide a preference setting to enable bmff support and thereby place the responsibility for the use of this code with the user of the application. diff --git a/include/exiv2/exiv2.hpp b/include/exiv2/exiv2.hpp index 5efd9d57..b4bb507b 100644 --- a/include/exiv2/exiv2.hpp +++ b/include/exiv2/exiv2.hpp @@ -45,9 +45,7 @@ #include "exiv2/mrwimage.hpp" #include "exiv2/orfimage.hpp" #include "exiv2/pgfimage.hpp" -#ifdef EXV_ENABLE_BMFF #include "bmffimage.hpp" -#endif #ifdef EXV_HAVE_LIBZ #include "exiv2/pngimage.hpp" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index df355bc4..c52b352f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -118,11 +118,9 @@ if( EXIV2_ENABLE_VIDEO ) ) endif() -if( EXIV2_ENABLE_BMFF ) - target_sources(exiv2lib PRIVATE - bmffimage.cpp ../include/exiv2/bmffimage.hpp - ) -endif() +target_sources(exiv2lib PRIVATE + bmffimage.cpp ../include/exiv2/bmffimage.hpp +) # Other library target properties # --------------------------------------------------------- diff --git a/src/bmffimage.cpp b/src/bmffimage.cpp index 9a0f7e65..bc6c5439 100644 --- a/src/bmffimage.cpp +++ b/src/bmffimage.cpp @@ -84,18 +84,15 @@ struct BmffBoxHeader // ***************************************************************************** // class member definitions +#ifdef EXV_ENABLE_BMFF namespace Exiv2 { - static bool enabled = false; - -#ifdef EXV_ENABLE_BMFF + static bool enabled = false; EXIV2API bool enableBMFF(bool enable) { - bool result = enabled; - enabled = enable ; - return result ; + enabled = enable ; + return true ; } -#endif // EXV_ENABLE_BMFF std::string Iloc::toString() const { @@ -629,3 +626,13 @@ namespace Exiv2 return matched; } } // namespace Exiv2 +#else // ifdef EXV_ENABLE_BMFF +namespace Exiv2 +{ + EXIV2API bool enableBMFF(bool) + { + return false ; + } +} +#endif + From 7c6e81ff320d1eab87d38b2ac67ce925fe5c96b5 Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Wed, 14 Apr 2021 16:50:46 +0100 Subject: [PATCH 16/17] Only reveal class bmffimage in include/exiv2/bmffimage.hpp ifdef EXV_ENABLE_BMFF --- include/exiv2/bmffimage.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/exiv2/bmffimage.hpp b/include/exiv2/bmffimage.hpp index 40128e44..8bc160fe 100644 --- a/include/exiv2/bmffimage.hpp +++ b/include/exiv2/bmffimage.hpp @@ -32,7 +32,11 @@ namespace Exiv2 { EXIV2API bool enableBMFF(bool enable = true); +} +#ifdef EXV_ENABLE_BMFF +namespace Exiv2 +{ struct Iloc { Iloc(uint32_t ID = 0, uint32_t start = 0, uint32_t length = 0) : ID_(ID), start_(start), length_(length){}; @@ -168,3 +172,4 @@ namespace Exiv2 //! Check if the file iIo is a BMFF image. EXIV2API bool isBmffType(BasicIo& iIo, bool advance); } // namespace Exiv2 +#endif // EXV_ENABLE_BMFF From bf1e9fe4ad557d41bb4ff98ac410970f5ea60241 Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Thu, 15 Apr 2021 12:41:31 +0100 Subject: [PATCH 17/17] fix_1558_cmake_build_type --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e4154af7..3da474ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,11 @@ project(exiv2 # use TWEAK to categorize the build # 1.00.0.29 = RC2 Development LANGUAGES CXX ) + +if(NOT CMAKE_BUILD_TYPE) + set (CMAKE_BUILD_TYPE Release) +endif() + include(cmake/mainSetup.cmake REQUIRED) # options and their default values