diff --git a/README.md b/README.md index 71bcc0a1..6b7405c8 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ | [![Build Status](https://travis-ci.org/Exiv2/exiv2.svg?branch=0.27-maintenance)](https://travis-ci.org/Exiv2/exiv2) | [![Build status](https://ci.appveyor.com/api/projects/status/d6vxf2n0cp3v88al/branch/0.27-maintenance?svg=true)](https://ci.appveyor.com/project/piponazo/exiv2-wutfp/branch/0.27-maintenance) | [![pipeline status](https://gitlab.com/D4N/exiv2/badges/0.27-maintenance/pipeline.svg)](https://gitlab.com/D4N/exiv2/commits/0.27-maintenance) | [![codecov](https://codecov.io/gh/Exiv2/exiv2/branch/0.27-maintenance/graph/badge.svg)](https://codecov.io/gh/Exiv2/exiv2) | [![Packaging status](https://repology.org/badge/tiny-repos/exiv2.svg)](https://repology.org/metapackage/exiv2/versions) |
-### TABLE OF CONTENTS +### TABLE OF CONTENTS 1. [Welcome to Exiv2](#1) 2. [Building, Installing, Using and Uninstalling Exiv2](#2) @@ -31,7 +31,7 @@ 3. [Unit tests](#4-3) 5. [Platform Notes](#5) 1. [Linux](#5-1) - 2. [MacOS-X](#5-2) + 2. [macOS](#5-2) 3. [MinGW](#5-3) 4. [Cygwin](#5-4) 5. [Microsoft Visual C++](#5-5) @@ -61,14 +61,14 @@ The file ReadMe.txt in a Build bundle describes how to install the library on th ## 2 Building, Installing, Using and Uninstalling Exiv2 -You need [CMake](https://cmake.org/download/) to configure the Exiv2 project and a C++11 compiler. +You need [CMake](https://cmake.org/download/) to configure the Exiv2 project and the GCC or Clang compiler and associated tool chain.
### 2.1 Build, Install, Use Exiv2 on a UNIX-like system ```bash -cd $EXIV_ROOT +cd ~/gnu/github/exiv2 # location of the project code mkdir build && cd build cmake .. -DCMAKE_BUILD_TYPE=Release cmake --build . @@ -90,7 +90,7 @@ You will also need to locate libexiv2 at run time: ```bash $ export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" # Linux, Cygwin, MinGW/msys2 -$ export DYLD_LIBRARY_PATH="/usr/local/lib:$DYLD_LIBRARY_PATH" # MacOS-X +$ export DYLD_LIBRARY_PATH="/usr/local/lib:$DYLD_LIBRARY_PATH" # macOS ``` @@ -165,7 +165,7 @@ See [README-CONAN](README-CONAN.md) for more information. There are detailed platform notes about compiling and linking in `releasenotes/{platform}/ReadMe.txt` -where `platform: { CYGWIN | Darwin | Linux | MinGW | msvc }` +where `platform: { CYGWIN | macOS | Linux | MinGW | msvc }` In general you need to do the following: @@ -249,7 +249,7 @@ g++ -std=c++98 myprogram.cpp -o myprogram $(pkg-config exiv2 --libs --cflags) ### 2.8 Localisation -Localisation is supported on a UNIX-like platform: Linux, MacOS-X, Cygwin and MinGW/msys2. Localisation is not supported for Visual Studio builds. +Localisation is supported on a UNIX-like platform: Linux, macOS, Cygwin and MinGW/msys2. Localisation is not supported for Visual Studio builds. To build localisation support, use the CMake option `-DEXIV2_ENABLE_NLS=ON`. You must install the `gettext` package with your package manager or from source. The `gettext` package is available from [http://www.gnu.org/software/gettext/](http://www.gnu.org/software/gettext/) and includes the library `libintl` and utilities to build localisation files. If CMake produces error messages which mention libintl or gettext, you should verify that the package `gettext` has been correctly built and installed. @@ -515,7 +515,7 @@ $ cmake .. $ cmake --build . ``` -2) On MacOS-X +2) On macOS Apple provide clang with Xcode. GCC has not been supported by Apple since 2013. The _"normal unix build"_ uses Clang. @@ -525,7 +525,7 @@ I have been unable to get clang to work on any of those platforms. 4) Cross Compiling -I've never succeeded in getting this to work. I use different VMs for Linux 32 and 64 bit. I've documented how to set up Cygwin and MinGW/msys2 for 64 and 32 bit builds in [README-CONAN](README-CONAN.md) +I've never succeeded in getting this to work. I use different VMs for Linux 32 and 64 bit. I've documented how to set up Cygwin and MinGW/msys2 in [README-CONAN](README-CONAN.md) [TOC](#TOC)
@@ -733,9 +733,9 @@ $ make [TOC](#TOC)
-### 5.2 MacOS-X +### 5.2 macOS -You will need to install Xcode and the Xcode command-line tools to build on the Mac. +You will need to install Xcode and the Xcode command-line tools to build on macOS. You should build and install libexpat and zlib. You may use brew, macports, build from source, or use conan. @@ -746,14 +746,12 @@ I recommend that you build and install CMake from source. ### 5.3 MinGW -We provide support for both 64bit and 32bit builds using MinGW/msys2. [https://www.msys2.org](https://www.msys2.org) - -Support for MinGW/msys1.0 32 bit build was provided for Exiv2 v0.26. MinGW/msys1.0 is not supported by Team Exiv2 for Exiv2 v0.27 and later. +Please note that the platform MinGW/msys2 32 is obsolete and superceded by MinGW/msys2 64. There is a discussion on the web about installing GTest: [https://github.com/Exiv2/exiv2/issues/575](https://github.com/Exiv2/exiv2/issues/575) #### MinGW/msys2 64 bit -Install: [http://repo.msys2.org/distrib/x86\_64/msys2-x86\_64-20180531.exe](http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20180531.exe) +Install: [http://repo.msys2.org/distrib/x86_64/msys2-x86\_64-20190524.exe](http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20190524.exe) I use the following batch file to start the MinGW/msys2 64 bit bash shell from the Dos Command Prompt (cmd.exe) @@ -769,23 +767,6 @@ c:\msys64\usr\bin\bash.exe -norc ``` -#### MinGW/msys2 32 bit -Install: [http://repo.msys2.org/distrib/i686/msys2-i686-20180531.exe](http://repo.msys2.org/distrib/i686/msys2-i686-20180531.exe) - -I use the following batch file to start the MinGW/msys2 32 bit bash shell from the Dos Command Prompt (cmd.exe) - -```bat -@echo off -setlocal -set "PS1=\! MSYS32:\u@\h:\w \$ " -set PATH="/usr/local/bin/:/usr/bin:/mingw32/bin:/bin:/usr/sbin:/sbin" -set "HOME=c:\msys32\home\%USERNAME%" -if NOT EXIST %HOME% mkdir %HOME% -cd %HOME% -c:\msys32\usr\bin\bash.exe -norc - -``` - #### Install MinGW Dependencies Install tools and dependencies: @@ -794,12 +775,6 @@ Install tools and dependencies: $ for i in base-devel git cmake coreutils python3 man gcc gdb make dos2unix diffutils zlib-devel libexpat-devel libiconv-devel gettext-devel; do (echo y|pacman -S $i); done ``` -You can upgrade all installed packages on your system with the following command. For me, this broke msys32 and I had to reinstall msys32 and all the dependencies. Your experience may be different. - -```bash -$ pacman -Syu -``` - #### Download exiv2 from github and build ```bash @@ -826,9 +801,11 @@ $ [TOC](#TOC)
-### 5.4 Cygwin +### 5.4 Cygwin/64 -Download: [https://cygwin.com/install.html](https://cygwin.com/install.html) and run setup-x86_64.exe for 64 Bit Cygwin, or setup-x86.exe for 32 bit Cygwin. I install into c:\\cygwin64 and c:\\cygwin32 +Please note that the platform Cygwin/32 is obsolete and superceded by Cygwin/64. + +Download: [https://cygwin.com/install.html](https://cygwin.com/install.html) and run setup-x86_64.exe. I install into c:\\cygwin64 You need: make, cmake, gcc, gettext-devel pkg-config, dos2unix, zlib-devel, libexpat1-devel, git, python3-interpreter, libiconv, libxml2-utils, libncurses. @@ -840,7 +817,7 @@ There is a discussion on the web about installing GTest: [https://github.com/Exi Download and build cmake from source because I can't get the cygwin installed cmake 3.6.2 to work. To build cmake from source, you need libncurses. [https://cmake.org/download/](https://cmake.org/download/) -I use the following batch file "cygwin64.bat" to start the Cygwin/64 bit bash shell from the Dos Command Prompt (cmd.exe). +I use the following batch file "cygwin64.bat" to start the Cygwin/64 bash shell from the Dos Command Prompt (cmd.exe). ```bat @echo off @@ -930,4 +907,4 @@ Work in progress: [https://github.com/Exiv2/exiv2/issues/902](https://github.co Robin Mills -Revised: 2019-08-03 +Revised: 2020-03-23 diff --git a/man/man1/exiv2.1 b/man/man1/exiv2.1 index 304b51ef..19d3bc76 100644 --- a/man/man1/exiv2.1 +++ b/man/man1/exiv2.1 @@ -2,7 +2,7 @@ .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) -.TH EXIV2 1 "Aug 25, 2019" +.TH EXIV2 1 "March 22, 2020" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -533,14 +533,34 @@ The value is optional. Not providing any value is equivalent to an empty value ("") and is mainly useful to create an XMP array property, e.g., a bag. .sp 1 -The format of Exif \fBComment\fP values includes an optional charset -specification at the beginning: -.br -.B [charset=Ascii|Jis|Unicode|Undefined ]\fIcomment\fP +The format of Exif \fBComment\fP values include an optional charset +specification at the beginning. Comments are used by the tags Exif.Photo.UserComment, Exif.GPSInfo.GPSProcessingMethod +and Exif.GPSInfo.GPSAreaInformation. Comments are stored as Undefined tags with an 8 byte encoding +definition follow by the encoded data. The charset is specified as follows: .sp 1 -.B Undefined -is used by default if the value doesn't start with a charset -definition. +.B [charset=Ascii|Jis|Unicode|Undefined] \fIcomment\fP +.br +charset=Undefined is the default +.sp 1 +.nf +$ exiv2 -M'set Exif.Photo.UserComment charset=Ascii My photo' x.jpg +$ exiv2 -pa --grep UserComment x.jpg +Exif.Photo.UserComment Undefined 16 My photo +$ exiv2 -pv --grep UserComment x.jpg +0x9286 Photo UserComment Undefined 16 charset="Ascii" My photo + +$ exiv2 -M'set Exif.Photo.UserComment charset=Unicode \\u0052\\u006f\\u0062\\u0069\\u006e' x.jpg +$ exiv2 -pa --grep UserComment x.jpg +Exif.Photo.UserComment Undefined 18 Robin +$ exiv2 -pv --grep UserComment x.jpg +0x9286 Photo UserComment Undefined 18 charset="Unicode" Robin + +$ exiv2 -M'set Exif.GPSInfo.GPSProcessingMethod HYBRID-FIX' x.jpg +$ exiv2 -pa --grep ProcessingMethod x.jpg +Exif.GPSInfo.GPSProcessingMethod Undefined 18 HYBRID-FIX +$ exiv2 -pv --grep ProcessingMethod x.jpg +0x001b GPSInfo GPSProcessingMethod Undefined 18 HYBRID-FIX +.fi .sp 1 The format for an IPTC \fBDate\fP value is: .sp 1 @@ -661,7 +681,7 @@ Type Explanation The printing flag t = translated and is intended for human use. Scripts should never use translated values as they are localised and the format may change as Exiv2 evolves. The printing flag v reports the values recorded in the metadata and should be used by scripts. .ne 40 .SH CONFIGURATION FILE -Exiv2 can read an optional configuration file ~/.exiv2 on Unix systems and %USERPROFILE%\\exiv2.ini on Windows (using a Visual Studio build). Cygwin and MinGW/msys2 follow the unix convention and use ~/.exiv2 You can fine the location of the configuration file with the command: +Exiv2 can read an optional configuration file ~/.exiv2 on Unix systems and %USERPROFILE%\\exiv2.ini on Windows (using a Visual Studio build). Cygwin and MinGW/msys2 follow the unix convention and use ~/.exiv2 You can determine the location of the configuration file with the command: .br .sp 1 .nf diff --git a/src/actions.cpp b/src/actions.cpp index ff9f28b0..826d9e8b 100644 --- a/src/actions.cpp +++ b/src/actions.cpp @@ -696,7 +696,15 @@ namespace Action { return true; } bool done = false; - if (0 == strcmp(md.key().c_str(), "Exif.Photo.UserComment")) { + // handle `comment` typeIDs + // $ bin/taglist | grep '\tComment,' | cut -d, -f 5 + // Exif.Photo.UserComment + // Exif.GPSInfo.GPSProcessingMethod + // Exif.GPSInfo.GPSAreaInformation + if( md.key() == "Exif.Photo.UserComment" + || md.key() == "Exif.GPSInfo.GPSProcessingMethod" + || md.key() == "Exif.GPSInfo.GPSAreaInformation" + ) { const Exiv2::CommentValue* pcv = dynamic_cast(&md.value()); if (pcv) { Exiv2::CommentValue::CharsetId csId = pcv->charsetId(); diff --git a/src/tags_int.cpp b/src/tags_int.cpp index add81946..8688d26f 100644 --- a/src/tags_int.cpp +++ b/src/tags_int.cpp @@ -1908,13 +1908,12 @@ namespace Exiv2 { gpsId, gpsTags, unsignedRational, 1, printValue), TagInfo(0x001b, "GPSProcessingMethod", N_("GPS Processing Method"), N_("A character string recording the name of the method used for location finding. " - "The first byte indicates the character code used, and this is followed by the name " - "of the method."), - gpsId, gpsTags, undefined, 0, printValue), + "The string encoding is defined using the same scheme as UserComment."), + gpsId, gpsTags, comment, 0, print0x9286), TagInfo(0x001c, "GPSAreaInformation", N_("GPS Area Information"), - N_("A character string recording the name of the GPS area. The first byte indicates " - "the character code used, and this is followed by the name of the GPS area."), - gpsId, gpsTags, undefined, 0, printValue), + N_("A character string recording the name of the GPS area." + "The string encoding is defined using the same scheme as UserComment."), + gpsId, gpsTags, comment, 0, print0x9286), TagInfo(0x001d, "GPSDateStamp", N_("GPS Date Stamp"), N_("A character string recording date and time information relative to UTC " "(Coordinated Universal Time). The format is \"YYYY:MM:DD.\"."), @@ -2229,38 +2228,23 @@ namespace Exiv2 { std::ostream& printFloat(std::ostream& os, const Value& value, const ExifData*) { Rational r = value.toRational(); - if (r.second != 0) return os << static_cast(r.first) / r.second; - return os << "(" << value << ")"; + if (r.second != 0) { + os << value.toFloat() ; + } else { + os << "(" << value << ")"; + } + return os; } // printFloat std::ostream& printDegrees(std::ostream& os, const Value& value, const ExifData*) { std::ios::fmtflags f( os.flags() ); if (value.count() == 3) { - std::ostringstream oss; - oss.copyfmt(os); static const char* unit[] = { "deg", "'", "\"" }; - static const int prec[] = { 7, 5, 3 }; - int n; - for (n = 2; n > 0; --n) { - if (value.toRational(n).first != 0) break; + 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]; } - for (int i = 0; i < n + 1; ++i) { - const uint32_t z = (uint32_t) value.toRational(i).first; - const uint32_t d = (uint32_t) value.toRational(i).second; - if (d == 0) - { - os << "(" << value << ")"; - os.flags(f); - return os; - } - // Hack: Need Value::toDouble - double b = static_cast(z)/d; - const int p = z % d == 0 ? 0 : prec[i]; - os << std::fixed << std::setprecision(p) << b - << unit[i] << " "; - } - os.copyfmt(oss); } else { os << value; diff --git a/src/tiffcomposite_int.cpp b/src/tiffcomposite_int.cpp index 8c792c00..a6bf925b 100644 --- a/src/tiffcomposite_int.cpp +++ b/src/tiffcomposite_int.cpp @@ -1836,14 +1836,33 @@ namespace Exiv2 { return len; } // TiffImageEntry::doSizeImage + static const TagInfo* findTagInfo(uint16_t tag,IfdId group) + { + const TagInfo* result = NULL ; + const TagInfo* tags = group == exifId ? Internal::exifTagList() + : group == gpsId ? Internal::gpsTagList() + : NULL + ; + if ( tags ) { + for ( size_t idx = 0; result==NULL && tags[idx].tag_ != 0xffff; ++idx) { + if ( tags[idx].tag_ == tag ) { + result = tags+idx; + } + } + } + return result; + } + // ************************************************************************* // free functions TypeId toTypeId(TiffType tiffType, uint16_t tag, IfdId group) { TypeId ti = TypeId(tiffType); - // On the fly type conversion for Exif.Photo.UserComment - if (tag == 0x9286 && group == exifId && ti == undefined) { - ti = comment; + // On the fly type conversion for Exif.Photo.UserComment, Exif.GPSProcessingMethod, GPSAreaInformation + if ( const TagInfo* pTag = ti == undefined ? findTagInfo(tag,group) : NULL ) { + if ( pTag->typeId_ == comment ) { + ti = comment; + } } // http://dev.exiv2.org/boards/3/topics/1337 change unsignedByte to signedByte // Exif.NikonAFT.AFFineTuneAdj || Exif.Pentax.Temperature diff --git a/test/data/IMG_0246.exv b/test/data/IMG_0246.exv new file mode 100644 index 00000000..bf54ec9f Binary files /dev/null and b/test/data/IMG_0246.exv differ diff --git a/test/data/geotag-test.out b/test/data/geotag-test.out index 36e7d353..0d49855c 100644 --- a/test/data/geotag-test.out +++ b/test/data/geotag-test.out @@ -1,14 +1,14 @@ --- 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 36deg 26' 54" Exif.GPSInfo.GPSLongitudeRef Ascii 2 West -Exif.GPSInfo.GPSLongitude Rational 3 116deg 51' 18" +Exif.GPSInfo.GPSLongitude Rational 3 116deg 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 Exif.GPSInfo.GPSMapDatum Ascii 7 WGS-84 -Exif.GPSInfo.GPSProcessingMethod Undefined 18 65 83 67 73 73 0 0 0 72 89 66 82 73 68 45 70 73 88 +Exif.GPSInfo.GPSProcessingMethod Undefined 18 HYBRID-FIX Exif.GPSInfo.GPSDateStamp Ascii 20 2008:05:08 09:54:28 --- deleting the GPSInfo tags --- run geotag --- @@ -16,12 +16,12 @@ 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 36deg 26' 54" Exif.GPSInfo.GPSLongitudeRef Ascii 2 West -Exif.GPSInfo.GPSLongitude Rational 3 116deg 51' 18" +Exif.GPSInfo.GPSLongitude Rational 3 116deg 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 Exif.GPSInfo.GPSMapDatum Ascii 7 WGS-84 -Exif.GPSInfo.GPSProcessingMethod Undefined 18 65 83 67 73 73 0 0 0 72 89 66 82 73 68 45 70 73 88 +Exif.GPSInfo.GPSProcessingMethod Undefined 58 65 83 67 73 73 0 0 0 72 89 66 82 73 68 45 70 73 88 Exif.GPSInfo.GPSDateStamp Ascii 20 2008:05:08 09:54:28 diff --git a/tests/bugfixes/github/test_issue_1046.py b/tests/bugfixes/github/test_issue_1046.py new file mode 100644 index 00000000..0090019c --- /dev/null +++ b/tests/bugfixes/github/test_issue_1046.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- + +from system_tests import CaseMeta, CopyFiles, path +@CopyFiles("$data_path/IMG_0246.exv") + +class test_issue_1046Test(metaclass=CaseMeta): + + filename = path("$data_path/IMG_0246_copy.exv") + # Use the """ string syntax for -M"set Bla.Dee.Bla" commands to ensure they run on Windows! + commands = [ "$exiv2 -pt -g GPSInfo -g UserCom $filename" + , "$exiv2 -pv -g GPSInfo -g UserCom $filename" + ,"""$exiv2 -M"set Exif.Photo.UserComment charset=Ascii how now brown cow" $filename""" + , "$exiv2 -pt -g UserComment $filename" + , "$exiv2 -pv -g UserComment $filename" + ,"""$exiv2 -M"set Exif.Photo.UserComment charset=Unicode \u0041\u0042" $filename""" + , "$exiv2 -pt -g UserComment $filename" + , "$exiv2 -pv -g UserComment $filename" + ,"""$exiv2 -M"set Exif.Photo.UserComment hello world" $filename""" + , "$exiv2 -pt -g UserComment $filename" + , "$exiv2 -pv -g UserComment $filename" + ,"""$exiv2 -M"set Exif.GPSInfo.GPSProcessingMethod charset=Unicode \u0052\u006f\u0062\u0069\u006e" $filename""" + ,"""$exiv2 -M"set Exif.GPSInfo.GPSAreaInformation charset=Ascii area information" $filename""" + , "$exiv2 -pt -g GPSPro -g GPSArea $filename" + , "$exiv2 -pv -g GPSPro -g GPSArea $filename" + ] + stdout = ["""Exif.Photo.UserComment Undefined 12 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.GPSLongitudeRef Ascii 2 West +Exif.GPSInfo.GPSLongitude Rational 3 0deg 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 +Exif.GPSInfo.GPSMapDatum Ascii 7 WGS-84 +Exif.GPSInfo.GPSProcessingMethod Undefined 18 HYBRID-FIX +Exif.GPSInfo.GPSAreaInformation Undefined 23 Surrey, England +Exif.GPSInfo.GPSDateStamp Ascii 20 2020:02:02 10:34:11 +""","""0x9286 Photo UserComment Undefined 12 charset="Unicode" AB +0x0000 GPSInfo GPSVersionID Byte 4 2 2 0 0 +0x0001 GPSInfo GPSLatitudeRef Ascii 2 N +0x0002 GPSInfo GPSLatitude Rational 3 51/1 23/1 13/1 +0x0003 GPSInfo GPSLongitudeRef Ascii 2 W +0x0004 GPSInfo GPSLongitude Rational 3 0/1 44/1 27/1 +0x0005 GPSInfo GPSAltitudeRef Byte 1 0 +0x0006 GPSInfo GPSAltitude Rational 1 10420/100 +0x0007 GPSInfo GPSTimeStamp Rational 3 10/1 34/1 11/1 +0x0012 GPSInfo GPSMapDatum Ascii 7 WGS-84 +0x001b GPSInfo GPSProcessingMethod Undefined 18 charset="Ascii" HYBRID-FIX +0x001c GPSInfo GPSAreaInformation Undefined 23 Surrey, England +0x001d GPSInfo GPSDateStamp Ascii 20 2020:02:02 10:34:11 +""","","""Exif.Photo.UserComment Undefined 25 how now brown cow +""","""0x9286 Photo UserComment Undefined 25 charset="Ascii" how now brown cow +""","","""Exif.Photo.UserComment Undefined 12 AB +""","""0x9286 Photo UserComment Undefined 12 charset="Unicode" AB +""","","""Exif.Photo.UserComment Undefined 19 hello world +""","""0x9286 Photo UserComment Undefined 19 hello world +""","","","""Exif.GPSInfo.GPSProcessingMethod Undefined 18 Robin +Exif.GPSInfo.GPSAreaInformation Undefined 24 area information +""","""0x001b GPSInfo GPSProcessingMethod Undefined 18 charset="Unicode" Robin +0x001c GPSInfo GPSAreaInformation Undefined 24 charset="Ascii" area information +""" + ] + stderr = [""]*len(commands) + retval = [ 0]*len(commands) diff --git a/tests/bugfixes/github/test_issue_987.py b/tests/bugfixes/github/test_issue_987.py deleted file mode 100644 index 397f7a81..00000000 --- a/tests/bugfixes/github/test_issue_987.py +++ /dev/null @@ -1,28 +0,0 @@ -# -*- coding: utf-8 -*- - -from system_tests import CaseMeta, path -import zlib - -class tagListTest(metaclass=CaseMeta): - def compare_stdout(self, i, command, got_stdout, expected_stdout): - lines = got_stdout.split('\n') - count = len(lines); - checksum = zlib.adler32(got_stdout.encode()) - new_got = "%s,%s" % (count, checksum) - return super().compare_stdout(i, command, new_got, expected_stdout) - - commands = ["$taglist --help", - "$taglist all", - "$taglist ALL", - "$taglist Groups", - "$taglist nothing", - ] - stdout = ["8,198867862", - "5426,1072295739", - "5426,838787056", - "107,430791180", - "8,198867862", - ] - - stderr = ["","","","","Unexpected argument nothing\n"] - retval = [ 0,0, 0, 0, 2] diff --git a/tests/bugfixes/redmine/test_issue_1024.py b/tests/bugfixes/redmine/test_issue_1024.py index 5943691c..d98d530d 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 3.81700' +Exif.GPSInfo.GPSLatitude Rational 3 52deg 4' 0" Exif.GPSInfo.GPSLongitudeRef Ascii 2 East -Exif.GPSInfo.GPSLongitude Rational 3 1deg 13.81940' +Exif.GPSInfo.GPSLongitude Rational 3 1deg 14' 0" """ ] stderr = [""] diff --git a/tests/bugfixes/redmine/test_issue_1137.py b/tests/bugfixes/redmine/test_issue_1137.py index 8e465b18..8cdecf71 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 10.69690' +Exif.GPSInfo.GPSLatitude Rational 3 51deg 11' 0" Exif.GPSInfo.GPSLongitudeRef Ascii 2 West -Exif.GPSInfo.GPSLongitude Rational 3 1deg 49.59840' +Exif.GPSInfo.GPSLongitude Rational 3 1deg 50' 0" """ ] diff --git a/tests/bugfixes/redmine/test_issue_528.py b/tests/bugfixes/redmine/test_issue_528.py index d8ddebeb..7db691e2 100644 --- a/tests/bugfixes/redmine/test_issue_528.py +++ b/tests/bugfixes/redmine/test_issue_528.py @@ -70,9 +70,9 @@ Exif.Photo.Saturation Short 1 Normal Exif.Image.GPSTag Long 1 867 Exif.GPSInfo.GPSVersionID Byte 4 2.0.0.0 Exif.GPSInfo.GPSLatitudeRef Ascii 2 North -Exif.GPSInfo.GPSLatitude Rational 3 47deg 36' 58.020" +Exif.GPSInfo.GPSLatitude Rational 3 47deg 36' 58" Exif.GPSInfo.GPSLongitudeRef Ascii 2 East -Exif.GPSInfo.GPSLongitude Rational 3 1deg 31' 0.940" +Exif.GPSInfo.GPSLongitude Rational 3 1deg 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)