Merge pull request #1207 from Exiv2/fix_1165_UNIX_test_0.27

Fix 1165 unix test 0.27
v0.27.3
Robin Mills 5 years ago committed by GitHub
commit de4d305d2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -90,13 +90,8 @@ if( EXIV2_BUILD_UNIT_TESTS )
) )
endif() endif()
# Run a reduced test suite on UNIX #902
set (TEST alltest)
if ( CMAKE_HOST_SOLARIS OR CMAKE_SYSTEM_NAME STREQUAL "NetBSD" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" )
set (TEST unixtest)
endif()
add_custom_target(version_test add_custom_target(version_test
COMMAND env EXIV2_BINDIR="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" ./version_test.sh COMMAND env EXIV2_BINDIR="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" make version_test
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/test" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/test"
) )
@ -106,14 +101,14 @@ if( EXIV2_BUILD_SAMPLES )
if( EXIV2_BUILD_UNIT_TESTS ) if( EXIV2_BUILD_UNIT_TESTS )
add_custom_target(tests add_custom_target(tests
COMMAND env EXIV2_BINDIR="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" make unit_test COMMAND env EXIV2_BINDIR="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" make unit_test
COMMAND env EXIV2_BINDIR="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" make ${TEST} COMMAND env EXIV2_BINDIR="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" make bash_tests
COMMAND env EXIV2_BINDIR="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" make python_tests COMMAND env EXIV2_BINDIR="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" make python_tests
COMMAND env EXIV2_BINDIR="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" make version_test COMMAND env EXIV2_BINDIR="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" make version_test
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/test" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/test"
) )
else() else()
add_custom_target(tests add_custom_target(tests
COMMAND env EXIV2_BINDIR="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" make ${TEST} COMMAND env EXIV2_BINDIR="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" make bash_tests
COMMAND env EXIV2_BINDIR="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" make python_tests COMMAND env EXIV2_BINDIR="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" make python_tests
COMMAND env EXIV2_BINDIR="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" make version_test COMMAND env EXIV2_BINDIR="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" make version_test
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/test" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/test"
@ -124,7 +119,7 @@ if( EXIV2_BUILD_SAMPLES )
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/test" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/test"
) )
add_custom_target(bash_tests add_custom_target(bash_tests
COMMAND env EXIV2_BINDIR="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" make ${TEST} COMMAND env EXIV2_BINDIR="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" make bash_tests
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/test" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/test"
) )
add_subdirectory( samples ) add_subdirectory( samples )

@ -31,6 +31,8 @@
1. [Running tests on a UNIX-like system](#4-1) 1. [Running tests on a UNIX-like system](#4-1)
2. [Running tests on Visual Studio builds](#4-2) 2. [Running tests on Visual Studio builds](#4-2)
3. [Unit tests](#4-3) 3. [Unit tests](#4-3)
4. [Python tests](#4-4)
5. [Test Summary](#4-5)
5. [Platform Notes](#5) 5. [Platform Notes](#5)
1. [Linux](#5-1) 1. [Linux](#5-1)
2. [macOS](#5-2) 2. [macOS](#5-2)
@ -701,7 +703,7 @@ You will find that 3 tests fail at the end of the test suite. It is safe to ign
### 2.17 Building with C++11 and other compilers ### 2.17 Building with C++11 and other compilers
Exiv2 uses the default compiler for your system. Exiv2 v0.27 was written to the C++ 1998 standard and uses auto\_ptr. The C++11 and C++14 compilers will issue deprecation warnings about auto\_ptr. As _auto\_ptr support has been removed from C++17, you cannot build Exiv2 v0.27 with C++17 or later compilers._ Exiv2 v0.28 and later do not use auto\_ptr and will build with modern Standard C++ Compilers. Exiv2 uses the default compiler for your system. Exiv2 v0.27 was written to the C++ 1998 standard and uses auto\_ptr. The C++11 and C++14 compilers will issue deprecation warnings about auto\_ptr. As _auto\_ptr support has been removed from C++17, you cannot build Exiv2 v0.27 with C++17 or later compilers._ Exiv2 v0.28 and later do not use auto\_ptr and will build with all modern C++ Standard Compilers.
To generate a build with C++11: To generate a build with C++11:
@ -785,7 +787,7 @@ Environment Variables used by the test suite:
### 4.1 Running tests on a UNIX-like system ### 4.1 Running tests on a UNIX-like system
You can run the suite directly from the build: You can run tests directly from the build:
```bash ```bash
$ cmake .. -G "Unix Makefiles" $ cmake .. -G "Unix Makefiles"
@ -801,11 +803,11 @@ You can run individual tests in the `test` directory using the environment varia
```bash ```bash
$ cd <exiv2dir>/build $ cd <exiv2dir>/build
$ cd ../test $ cd ../test
$ env EXIV2_BINDIR=${PWD}/../build/bin ./icc-test.sh $ ./icc-test.sh
ICC jpg md5 webp md5 png md5 jpg md5 ICC jpg md5 webp md5 png md5 jpg md5
all testcases passed. all testcases passed.
$ env EXIV2_BINDIR=${PWD}/../build/bin make python_tests $ make python_tests
... lots of output ... ... lots of output ...
test_run (tiff_test.test_tiff_test_program.TestTiffTestProg) ... ok test_run (tiff_test.test_tiff_test_program.TestTiffTestProg) ... ok
---------------------------------------------------------------------- ----------------------------------------------------------------------
@ -846,7 +848,7 @@ $ make tests
$ make python_tests $ make python_tests
$ ./icc-test.sh $ ./icc-test.sh
``` ```
##### Running tests suite from cmd.exe ##### Running tests from cmd.exe
You can build with Visual Studio using Conan. The is described in detail in [README-CONAN.md](README-CONAN.md) You can build with Visual Studio using Conan. The is described in detail in [README-CONAN.md](README-CONAN.md)
@ -871,15 +873,16 @@ c:\...\exiv2\build>copy c:\Python37\python.exe c:\Python37\python3.exe
You must set the environment strings EXIV2\_BINDIR, EXIV2\_EXT and modify PATH. You will need a DOS Python3 interpreter on your path, and you'll need the bash interpreter. By careful to ensure the DOS python3.exe is found before the MingW/msys2 python3. You must set the environment strings EXIV2\_BINDIR, EXIV2\_EXT and modify PATH. You will need a DOS Python3 interpreter on your path, and you'll need the bash interpreter. By careful to ensure the DOS python3.exe is found before the MingW/msys2 python3.
``` ```
c:\...\exiv2\build>set EXIV2_BINDIR=%CD% c:\...\exiv2\build>cd bin
c:\...\exiv2\build>set EXIV2_EXT=.exe c:\...\exiv2\build\bin>set EXIV2_BINDIR=%CD%
c:\...\exiv2\build\bin>set EXIV2_EXT=.exe
c:\...\exiv2\build\bin>set "PATH=c:\Python37;c:\Python37\Scripts;c:\msys64\usr\bin;%PATH%" c:\...\exiv2\build\bin>set "PATH=c:\Python37;c:\Python37\Scripts;c:\msys64\usr\bin;%PATH%"
``` ```
Move to the test directory and use make (which is in c:\msys64\usr\bin) to drive the test procedures. You cannot run the tests in the build directory because there is no Makefile in the build directory. Move to the test directory and use make (which is in c:\msys64\usr\bin) to drive the test procedures. You cannot run the tests in the build directory because there is no Makefile in the build directory.
``` ```
c:\...\exiv2\build>cd ..\test c:\...\exiv2\build\bin>cd ..\..\test
c:\...\exiv2\test>make bash_tests c:\...\exiv2\test>make bash_tests
... ...
c:\...\exiv2\test>make python_tests # or unit_test or version_test c:\...\exiv2\test>make python_tests # or unit_test or version_test
@ -938,6 +941,61 @@ The code for the unit tests is in `<exiv2dir>/unitTests`. To include unit tests
There is a discussion on the web about installing GTest: [https://github.com/Exiv2/exiv2/issues/575](https://github.com/Exiv2/exiv2/issues/575) There is a discussion on the web about installing GTest: [https://github.com/Exiv2/exiv2/issues/575](https://github.com/Exiv2/exiv2/issues/575)
[TOC](#TOC)
<div id="4-4">
### 4.4 Python tests
You can run the python tests from the build or test directory:
```bash
$ cd <exiv2dir>/build (or cd <exiv2dir>/test)
$ make python_tests
```
If you wish to run in verbose mode:
```bash
$ cd <exiv2dir>/build (or cd <exiv2dir>/test)
$ make python_tests VERBOSE=1
```
The python tests are stored in the directory `tests` and you can run them all with the command:
```bash
$ cd <exiv2dir>/tests
$ python3 runner.py
```
You can run them individually with the commands such as:
```bash
$ cd <exiv2dir>/tests
$ python3 runner.py --verbose bugfixes/redmine/test_issue_841.py # or $(find . -name "*841*.py")
```
You may wish to get a brief summary of failures with commands such as:
```bash
$ cd <exiv2dir>/build ( or cd <exiv2dir>/test)
$ make python_tests 2>&1 | grep FAIL
```
[TOC](#TOC)
<div id="4-5">
### 4.5 Test Summary
| *Tests* | Unix Style Platforms _(bash)_ | Visual Studio _(cmd.exe)_ |
|:-- |:--- |:-- |
| | $ cd \<exiv2dir\>/build or $ cd \<exiv2dir\>/test | \> cd \<exiv2dir\>/build |
| all | $ make tests | \> cmake --build . --config Release --target tests |
| bash | $ make bash_tests | \> cmake --build . --config Release --target bash_tests |
| python | $ make python_tests | \> cmake --build . --config Release --target python_tests |
| unit | $ make unit_test | \> cmake --build . --config Release --target unit_test |
| version | $ make version_test | \> cmake --build . --config Release --target version_test |
[TOC](#TOC) [TOC](#TOC)
<div id="5"> <div id="5">
@ -1201,4 +1259,4 @@ $ sudo pkg install developer/gcc-7
[TOC](#TOC) [TOC](#TOC)
Written by Robin Mills<br>robin@clanmills.com<br>Updated: 2020-05-06 Written by Robin Mills<br>robin@clanmills.com<br>Updated: 2020-05-12

@ -2,7 +2,7 @@
.\" First parameter, NAME, should be all caps .\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1) .\" other parameters are allowed: see man(7), man(1)
.TH EXIV2 1 "April 30, 2020" .TH EXIV2 1 "May 12, 2020"
.\" Please adjust this date whenever revising the manpage. .\" Please adjust this date whenever revising the manpage.
.\" .\"
.\" Some roff macros, for reference: .\" Some roff macros, for reference:
@ -132,7 +132,7 @@ exiv2 [ opt [arg] ]+ [ act ] file ...
.sp 1 .sp 1
option [arg] long option description option [arg] long option description
-a tim --adjust Modify time stamps. [+|-]HH[:MM[:SS[.mmm]]] -a tim --adjust Modify time stamps. [+|-]HH[:MM[:SS[.mmm]]]
-b --binary Show large binary values (default is to suppress them). -b --binary Show large binary values (default is to restrict them).
-c txt --comment JPEG comment string to set in the image ('modify' action). ... -c txt --comment JPEG comment string to set in the image ('modify' action). ...
-d tgt --delete Delete target(s) for the 'delete' action. ... -d tgt --delete Delete target(s) for the 'delete' action. ...
-D +-n --days Time adjustment by a positive or negative number of days ... -D +-n --days Time adjustment by a positive or negative number of days ...
@ -211,7 +211,7 @@ or 'm'(ute). The default log-level is 'w'. \fB\-Qm\fP is equivalent
to \fB\-q\fP. All log messages are written to standard error. to \fB\-q\fP. All log messages are written to standard error.
.TP .TP
.B \-b .B \-b
Show large binary values (default is to suppress them). The output from large binary values is to restricted by default. When outputting the value of a large value such as MakerNote, the default behaviour is to restrict the data and end with "...". The option --binary enables you to see all the data.
.TP .TP
.B \-u .B \-u
Show unknown tags (default is to suppress tags which don't have a name). Show unknown tags (default is to suppress tags which don't have a name).
@ -543,13 +543,13 @@ $ exiv2 -M'set Exif.Photo.UserComment charset=Ascii My photo' x.jpg
$ exiv2 -pa --grep UserComment x.jpg $ exiv2 -pa --grep UserComment x.jpg
Exif.Photo.UserComment Undefined 16 My photo Exif.Photo.UserComment Undefined 16 My photo
$ exiv2 -pv --grep UserComment x.jpg $ exiv2 -pv --grep UserComment x.jpg
0x9286 Photo UserComment Undefined 16 charset="Ascii" My photo 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 -M'set Exif.Photo.UserComment charset=Unicode \\u0052\\u006f\\u0062\\u0069\\u006e' x.jpg
$ exiv2 -pa --grep UserComment x.jpg $ exiv2 -pa --grep UserComment x.jpg
Exif.Photo.UserComment Undefined 18 Robin Exif.Photo.UserComment Undefined 18 Robin
$ exiv2 -pv --grep UserComment x.jpg $ exiv2 -pv --grep UserComment x.jpg
0x9286 Photo UserComment Undefined 18 charset="Unicode" Robin 0x9286 Photo UserComment Undefined 18 charset=Unicode Robin
$ exiv2 -M'set Exif.GPSInfo.GPSProcessingMethod HYBRID-FIX' x.jpg $ exiv2 -M'set Exif.GPSInfo.GPSProcessingMethod HYBRID-FIX' x.jpg
$ exiv2 -pa --grep ProcessingMethod x.jpg $ exiv2 -pa --grep ProcessingMethod x.jpg

@ -132,7 +132,7 @@ void print(const std::string& file)
<< std::dec << std::setw(3) << std::dec << std::setw(3)
<< std::setfill(' ') << std::right << std::setfill(' ') << std::right
<< i->count() << " " << i->count() << " "
<< std::dec << i->value() << std::dec << i->toString()
<< "\n"; << "\n";
} }
} }

@ -92,7 +92,7 @@ try {
<< std::dec << std::setw(3) << std::dec << std::setw(3)
<< std::setfill(' ') << std::right << std::setfill(' ') << std::right
<< i->count() << " " << i->count() << " "
<< std::dec << i->value() << std::dec << i->toString()
<< "\n"; << "\n";
} }

@ -41,7 +41,7 @@ try {
<< std::dec << std::setw(3) << std::dec << std::setw(3)
<< std::setfill(' ') << std::right << std::setfill(' ') << std::right
<< md->count() << " " << md->count() << " "
<< std::dec << md->value() << std::dec << md->toString()
<< std::endl; << std::endl;
} }
Exiv2::XmpParser::terminate(); Exiv2::XmpParser::terminate();

@ -43,7 +43,7 @@ try {
<< std::dec << std::setw(3) << std::dec << std::setw(3)
<< std::setfill(' ') << std::right << std::setfill(' ') << std::right
<< md->count() << " " << md->count() << " "
<< std::dec << md->value() << std::dec << md->toString()
<< std::endl; << std::endl;
} }
filename += "-new"; filename += "-new";

@ -55,7 +55,7 @@ int main(int argc, char** argv)
<< std::dec << std::setw(3) << std::dec << std::setw(3)
<< std::setfill(' ') << std::right << std::setfill(' ') << std::right
<< md->count() << " " << md->count() << " "
<< std::dec << md->value() << std::dec << md->toString()
<< std::endl; << std::endl;
} }

@ -606,6 +606,16 @@ namespace Action {
return result ; return result ;
} }
static void binaryOutput(bool suppressLong,const std::ostringstream& os)
{
const int dots = 100;
if ( suppressLong && os.str().length() > dots ) {
std::cout << os.str().substr(0,dots) << " ..." ;
} else {
std::cout << os.str();
}
}
bool Print::printMetadatum(const Exiv2::Metadatum& md, const Exiv2::Image* pImage) bool Print::printMetadatum(const Exiv2::Metadatum& md, const Exiv2::Image* pImage)
{ {
if (!grepTag(md.key())) if (!grepTag(md.key()))
@ -689,75 +699,30 @@ namespace Action {
if (!first) if (!first)
std::cout << " "; std::cout << " ";
first = false; first = false;
if (md.size() > 128 && Params::instance().binary_ && std::ostringstream os;
(md.typeId() == Exiv2::undefined || md.typeId() == Exiv2::unsignedByte || // #1114 - show negative values for SByte
md.typeId() == Exiv2::signedByte)) { if (md.typeId() == Exiv2::signedByte) {
std::cout << _("(Binary value suppressed)") << std::endl; for ( int c = 0 ; c < md.value().count() ; c++ ) {
return true; int value = md.value().toLong(c);
} os << (c?" ":"") << std::dec << (value < 128 ? value : value - 256);
bool done = false;
// 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<const Exiv2::CommentValue*>(&md.value());
if (pcv) {
Exiv2::CommentValue::CharsetId csId = pcv->charsetId();
if (csId != Exiv2::CommentValue::undefined) {
std::cout << "charset=\"" << Exiv2::CommentValue::CharsetInfo::name(csId) << "\" ";
}
std::cout << pcv->comment(Params::instance().charset_.c_str());
done = true;
}
}
if (!done) {
// #1114 - show negative values for SByte
if (md.typeId() != Exiv2::signedByte) {
std::cout << std::dec << md.value();
} else {
int value = md.value().toLong();
std::cout << std::dec << (value < 128 ? value : value - 256);
} }
} else {
os << std::dec << md.value();
} }
binaryOutput(Params::instance().binary_,os);
} }
if (Params::instance().printItems_ & Params::prTrans) { if (Params::instance().printItems_ & Params::prTrans) {
if (!first) if (!first)
std::cout << " "; std::cout << " ";
first = false; first = false;
if (Params::instance().binary_ && std::ostringstream os;
(md.typeId() == Exiv2::undefined || md.typeId() == Exiv2::unsignedByte || os << std::dec << md.print(&pImage->exifData());
md.typeId() == Exiv2::signedByte) && binaryOutput(Params::instance().binary_,os) ;
md.size() > 128) {
std::cout << _("(Binary value suppressed)") << std::endl;
return true;
}
bool done = false;
if (0 == strcmp(md.key().c_str(), "Exif.Photo.UserComment")) {
const Exiv2::CommentValue* pcv = dynamic_cast<const Exiv2::CommentValue*>(&md.value());
if (pcv) {
std::cout << pcv->comment(Params::instance().charset_.c_str());
done = true;
}
}
if (!done)
std::cout << std::dec << md.print(&pImage->exifData());
} }
if (Params::instance().printItems_ & Params::prHex) { if (Params::instance().printItems_ & Params::prHex) {
if (!first) if (!first)
std::cout << std::endl; std::cout << std::endl;
first = false; first = false;
if (Params::instance().binary_ &&
(md.typeId() == Exiv2::undefined || md.typeId() == Exiv2::unsignedByte ||
md.typeId() == Exiv2::signedByte) &&
md.size() > 128) {
std::cout << _("(Binary value suppressed)") << std::endl;
return true;
}
Exiv2::DataBuf buf(md.size()); Exiv2::DataBuf buf(md.size());
md.copy(buf.pData_, pImage->byteOrder()); md.copy(buf.pData_, pImage->byteOrder());
Exiv2::hexdump(std::cout, buf.pData_, buf.size_); Exiv2::hexdump(std::cout, buf.pData_, buf.size_);

@ -219,10 +219,19 @@ namespace Exiv2 {
std::ostream& Exifdatum::write(std::ostream& os, const ExifData* pMetadata) const std::ostream& Exifdatum::write(std::ostream& os, const ExifData* pMetadata) const
{ {
if (value().count() == 0) return os; if (value().count() == 0) return os;
PrintFct fct = printValue;
const TagInfo* ti = Internal::tagInfo(tag(), static_cast<IfdId>(ifdId())); PrintFct fct = printValue;
if (ti != 0) fct = ti->printFct_; const TagInfo* ti = Internal::tagInfo(tag(), static_cast<IfdId>(ifdId()));
return fct(os, value(), pMetadata); // be careful with comments (User.Photo.UserComment, GPSAreaInfo etc).
if ( ti ) {
fct = ti->printFct_;
if ( ti->typeId_ == comment ) {
os << value().toString();
fct=NULL;
}
}
if ( fct ) fct(os, value(), pMetadata);
return os;
} }
const Value& Exifdatum::value() const const Value& Exifdatum::value() const

@ -1562,7 +1562,7 @@ namespace Exiv2 {
N_("A tag for Exif users to write keywords or comments on the image " N_("A tag for Exif users to write keywords or comments on the image "
"besides those in <ImageDescription>, and without the " "besides those in <ImageDescription>, and without the "
"character code limitations of the <ImageDescription> tag."), "character code limitations of the <ImageDescription> tag."),
exifId, userInfo, comment, 0, print0x9286), exifId, userInfo, comment, 0, printValue),
TagInfo(0x9290, "SubSecTime", N_("Sub-seconds Time"), TagInfo(0x9290, "SubSecTime", N_("Sub-seconds Time"),
N_("A tag used to record fractions of seconds for the <DateTime> tag."), N_("A tag used to record fractions of seconds for the <DateTime> tag."),
exifId, dateTime, asciiString, 0, printValue), exifId, dateTime, asciiString, 0, printValue),
@ -1913,11 +1913,11 @@ namespace Exiv2 {
TagInfo(0x001b, "GPSProcessingMethod", N_("GPS Processing Method"), TagInfo(0x001b, "GPSProcessingMethod", N_("GPS Processing Method"),
N_("A character string recording the name of the method used for location finding. " 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."), "The string encoding is defined using the same scheme as UserComment."),
gpsId, gpsTags, comment, 0, print0x9286), gpsId, gpsTags, comment, 0, printValue),
TagInfo(0x001c, "GPSAreaInformation", N_("GPS Area Information"), TagInfo(0x001c, "GPSAreaInformation", N_("GPS Area Information"),
N_("A character string recording the name of the GPS area." N_("A character string recording the name of the GPS area."
"The string encoding is defined using the same scheme as UserComment."), "The string encoding is defined using the same scheme as UserComment."),
gpsId, gpsTags, comment, 0, print0x9286), gpsId, gpsTags, comment, 0, printValue),
TagInfo(0x001d, "GPSDateStamp", N_("GPS Date Stamp"), TagInfo(0x001d, "GPSDateStamp", N_("GPS Date Stamp"),
N_("A character string recording date and time information relative to UTC " N_("A character string recording date and time information relative to UTC "
"(Coordinated Universal Time). The format is \"YYYY:MM:DD.\"."), "(Coordinated Universal Time). The format is \"YYYY:MM:DD.\"."),
@ -2642,18 +2642,6 @@ namespace Exiv2 {
return os; return os;
} }
std::ostream& print0x9286(std::ostream& os, const Value& value, const ExifData*)
{
const CommentValue* pcv = dynamic_cast<const CommentValue*>(&value);
if (pcv) {
os << pcv->comment();
}
else {
os << value;
}
return os;
}
//! ColorSpace, tag 0xa001 //! ColorSpace, tag 0xa001
extern const TagDetails exifColorSpace[] = { extern const TagDetails exifColorSpace[] = {
{ 1, N_("sRGB") }, { 1, N_("sRGB") },

@ -404,8 +404,6 @@ namespace Exiv2 {
std::ostream& print0x9208(std::ostream& os, const Value& value, const ExifData*); std::ostream& print0x9208(std::ostream& os, const Value& value, const ExifData*);
//! Print the actual focal length of the lens //! Print the actual focal length of the lens
std::ostream& print0x920a(std::ostream& os, const Value& value, const ExifData*); std::ostream& print0x920a(std::ostream& os, const Value& value, const ExifData*);
//! Print the user comment
std::ostream& print0x9286(std::ostream& os, const Value& value, const ExifData*);
//! Print color space //! Print color space
std::ostream& print0xa001(std::ostream& os, const Value& value, const ExifData*); std::ostream& print0xa001(std::ostream& os, const Value& value, const ExifData*);
//! Print sensing method //! Print sensing method

@ -550,11 +550,23 @@ namespace Exiv2 {
{ {
CharsetId csId = charsetId(); CharsetId csId = charsetId();
if (csId != undefined) { if (csId != undefined) {
os << "charset=\"" << CharsetInfo::name(csId) << "\" "; os << "charset=" << CharsetInfo::name(csId) << " ";
} }
return os << comment(); return os << comment();
} }
// test string for printable ascii-7 (' ' .. '~')
static bool isBinary(const std::string& s)
{
bool result = false ;
size_t i = 0;
while ( !result && i < s.length() ) {
unsigned char c = (unsigned char) s[i++];
result = c < 32 || c > 127 ;
}
return result;
}
std::string CommentValue::comment(const char* encoding) const std::string CommentValue::comment(const char* encoding) const
{ {
std::string c; std::string c;
@ -565,6 +577,12 @@ namespace Exiv2 {
if (charsetId() == unicode) { if (charsetId() == unicode) {
const char* from = encoding == 0 || *encoding == '\0' ? detectCharset(c) : encoding; const char* from = encoding == 0 || *encoding == '\0' ? detectCharset(c) : encoding;
convertStringCharset(c, from, "UTF-8"); convertStringCharset(c, from, "UTF-8");
} else {
// charset=undefined reports "binary comment" if it contains non-printable bytes
// this is to ensure no binary bytes in the output stream.
if ( isBinary(c) ) {
c = "binary comment" ;
}
} }
return c; return c;
} }

@ -505,7 +505,7 @@ namespace Exiv2 {
enforce(filesize_u32 <= io_->size(), Exiv2::kerCorruptedMetadata); enforce(filesize_u32 <= io_->size(), Exiv2::kerCorruptedMetadata);
// Check that `filesize_u32` is safe to cast to `long`. // Check that `filesize_u32` is safe to cast to `long`.
enforce(filesize_u32 <= static_cast<size_t>(std::numeric_limits<long>::max()), enforce(filesize_u32 <= static_cast<size_t>(std::numeric_limits<unsigned int>::max()),
Exiv2::kerCorruptedMetadata); Exiv2::kerCorruptedMetadata);
WebPImage::decodeChunks(static_cast<long>(filesize_u32)); WebPImage::decodeChunks(static_cast<long>(filesize_u32));
@ -530,7 +530,7 @@ namespace Exiv2 {
const uint32_t size_u32 = Exiv2::getULong(size_buff, littleEndian); const uint32_t size_u32 = Exiv2::getULong(size_buff, littleEndian);
// Check that `size_u32` is safe to cast to `long`. // Check that `size_u32` is safe to cast to `long`.
enforce(size_u32 <= static_cast<size_t>(std::numeric_limits<long>::max()), enforce(size_u32 <= static_cast<size_t>(std::numeric_limits<unsigned int>::max()),
Exiv2::kerCorruptedMetadata); Exiv2::kerCorruptedMetadata);
const long size = static_cast<long>(size_u32); const long size = static_cast<long>(size_u32);

@ -72,29 +72,24 @@ SVN = svn://dev.exiv2.org/svn/testdata/trunk
## ##
# Add test drivers to this list # Add test drivers to this list
TESTS1 = addmoddel.sh \ TESTS = addmoddel.sh \
conversions.sh \ conversions.sh \
exifdata-test.sh \
exiv2-test.sh \
geotag-test.sh \ geotag-test.sh \
icc-test.sh \ icc-test.sh \
iso65k-test.sh \
modify-test.sh \
path-test.sh \
stringto-test.sh \
webp-test.sh \
write2-test.sh \
# the following tests are broken on UNIX
# You can manually run all the tests: `cd <exiv2dir>/test ; env EXIV2_BINDIR=$PWD/../build/bin make test`
# You can manually run a single test: `cd <exiv2dir>/test ; env EXIV2_BINDIR=$PWD/../build/bin ./iotest.sh`
# Or: make iotest
TESTS2 = exifdata-test.sh \
exiv2-test.sh \
imagetest.sh \ imagetest.sh \
iotest.sh \ iotest.sh \
iptctest.sh \ iptctest.sh \
iso65k-test.sh \
modify-test.sh \
path-test.sh \
preview-test.sh \ preview-test.sh \
stringto-test.sh \
tiff-test.sh \ tiff-test.sh \
webp-test.sh \
write-test.sh \ write-test.sh \
write2-test.sh \
xmpparser-test.sh xmpparser-test.sh
# video tests # video tests
@ -136,30 +131,29 @@ xmpparser-test:
version_test \ version_test \
unit_test : unit_test :
@echo
@echo ---- Running $@ ----
@echo
-@./$@.sh -@./$@.sh
bash_tests:
-@if [ -e $$EXIV2_BINDIR/../Makefile ]; then \
-@./$@.sh ; \
else \
make alltest ; \
fi
tests: tests:
-@if [ -e $$EXIV2_BINDIR/../Makefile ]; then \ -@if [ -e $$EXIV2_BINDIR/../Makefile ]; then \
-@./$@.sh ; \ -@./$@.sh ; \
else \ else \
make unit_test ; make alltest ; make python_tests ; make version_test ; \ make unit_test ; \
make bash_tests ; \
make python_tests ; \
make version_test ; \
fi fi
alltest: bash_tests:
@echo @echo
@echo ---- Running bash tests: ALL ---- @echo ---- Running bash_tests ----
@echo @echo
mkdir -p tmp @mkdir -p tmp
@rm -rf tmp/test-failed @rm -rf tmp/test-failed
@list='$(TESTS1) $(TESTS2)'; for p in $$list; do \ @list='$(TESTS)'; for p in $$list; do \
echo Running $$p ...; \ echo Running $$p ...; \
./$$p; \ ./$$p; \
rc=$$?; \ rc=$$?; \
@ -168,25 +162,13 @@ alltest:
done done
@if [ -e tmp/test-failed ]; then echo ; echo '***' FAILED ; cat tmp/test-failed ; echo '***' ; fi @if [ -e tmp/test-failed ]; then echo ; echo '***' FAILED ; cat tmp/test-failed ; echo '***' ; fi
unixtest:
@echo
@echo ---- Running bash tests: UNIX subset ----
@echo
mkdir -p tmp
@rm -rf tmp/test-failed
@list='$(TESTS1)'; for p in $$list; do \
echo Running $$p ...; \
./$$p; \
rc=$$?; \
if [ $$rc -ne 0 ]; then echo '***' ; echo '***' $$p result = $$rc ; echo '***' ; fi ; \
if [ $$rc -ne 0 ]; then echo '***' $$p result = $$rc >> tmp/test-failed ; fi ; \
done
@if [ -e tmp/test-failed ]; then echo '***' FAILED ; cat tmp/test-failed ; echo '***' ; fi
python_tests: python_tests:
@echo
@echo ---- Running python_tests ----
@echo
-( cd ../tests ; if [ ! -z $$VERBOSE ]; then verbose=--verbose ;fi ; python3 runner.py $$verbose ) -( cd ../tests ; if [ ! -z $$VERBOSE ]; then verbose=--verbose ;fi ; python3 runner.py $$verbose )
testv: testv:
@for t in /video ; do \ @for t in /video ; do \
if [ ! -e data/$$t ]; then \ if [ ! -e data/$$t ]; then \

@ -69,7 +69,7 @@ fi
grep x-default l.xmp grep x-default l.xmp
copyTestFile $IMG l.jpg copyTestFile $IMG l.jpg
runTest exiv2 -iX l.jpg runTest exiv2 -iX l.jpg
runTest exiv2 -px l.jpg runTest exiv2 -px -b l.jpg
runTest exiv2 -PEkycv l.jpg runTest exiv2 -PEkycv l.jpg
runTest exiv2 -pi l.jpg runTest exiv2 -pi l.jpg

@ -42,9 +42,9 @@ Iptc.Application2.Caption String 20 How to fix this mess
Testcase 6 Testcase 6
========== ==========
Exif.Image.ExifTag Long 1 26 Exif.Image.ExifTag Long 1 26
Exif.Photo.UserComment Undefined 59 charset="Jis" This is a JIS encoded Exif user comment. Or was it? Exif.Photo.UserComment Undefined 59 charset=Jis This is a JIS encoded Exif user comment. Or was it?
Xmp.exif.UserComment LangAlt 1 lang="x-default" This is a JIS encoded Exif user comment. Or was it? Xmp.exif.UserComment LangAlt 1 lang="x-default" This is a JIS encoded Exif user comment. Or was it?
Exif.Photo.UserComment Undefined 110 charset="Unicode" This is a JIS encoded Exif user comment. Or was it? Exif.Photo.UserComment Undefined 110 charset=Unicode This is a JIS encoded Exif user comment. Or was it?
File 1/1: m.xmp File 1/1: m.xmp
m.xmp: No IPTC data found in the file m.xmp: No IPTC data found in the file
@ -52,7 +52,7 @@ Testcase 7
========== ==========
Xmp.exif.UserComment LangAlt 1 lang="x-default" This is a JIS encoded Exif user comment. Or was it? Xmp.exif.UserComment LangAlt 1 lang="x-default" This is a JIS encoded Exif user comment. Or was it?
Exif.Image.ExifTag Long 1 26 Exif.Image.ExifTag Long 1 26
Exif.Photo.UserComment Undefined 110 charset="Unicode" This is a JIS encoded Exif user comment. Or was it? Exif.Photo.UserComment Undefined 110 charset=Unicode This is a JIS encoded Exif user comment. Or was it?
File 1/1: n.jpg File 1/1: n.jpg
n.jpg: No IPTC data found in the file n.jpg: No IPTC data found in the file

@ -267,7 +267,7 @@ Exif.Canon.FileNumber 0x0008 Makernote Long 1
Exif.Canon.OwnerName 0x0009 Makernote Ascii 32 Andreas Huggel Exif.Canon.OwnerName 0x0009 Makernote Ascii 32 Andreas Huggel
Exif.Canon.ModelID 0x0010 Makernote Long 1 17891328 Exif.Canon.ModelID 0x0010 Makernote Long 1 17891328
Exif.Canon.CameraInfo 0x000d Makernote Short 21 42 3 32769 378 32769 0 0 0 259 2 0 10 0 0 0 57 198 5 0 0 0 Exif.Canon.CameraInfo 0x000d Makernote Short 21 42 3 32769 378 32769 0 0 0 259 2 0 10 0 0 0 57 198 5 0 0 0
Exif.Photo.UserComment 0x9286 Exif Undefined 264 Exif.Photo.UserComment 0x9286 Exif Undefined 264 binary comment
Exif.Photo.FlashpixVersion 0xa000 Exif Undefined 4 48 49 48 48 Exif.Photo.FlashpixVersion 0xa000 Exif Undefined 4 48 49 48 48
Exif.Photo.ColorSpace 0xa001 Exif Short 1 1 Exif.Photo.ColorSpace 0xa001 Exif Short 1 1
Exif.Photo.PixelXDimension 0xa002 Exif Short 1 2272 Exif.Photo.PixelXDimension 0xa002 Exif Short 1 2272
@ -396,7 +396,7 @@ Exif.Canon.FileNumber 0x0008 Makernote Long 1
Exif.Canon.OwnerName 0x0009 Makernote Ascii 32 Andreas Huggel Exif.Canon.OwnerName 0x0009 Makernote Ascii 32 Andreas Huggel
Exif.Canon.ModelID 0x0010 Makernote Long 1 17891328 Exif.Canon.ModelID 0x0010 Makernote Long 1 17891328
Exif.Canon.CameraInfo 0x000d Makernote Short 21 42 3 32769 378 32769 0 0 0 259 2 0 10 0 0 0 57 198 5 0 0 0 Exif.Canon.CameraInfo 0x000d Makernote Short 21 42 3 32769 378 32769 0 0 0 259 2 0 10 0 0 0 57 198 5 0 0 0
Exif.Photo.UserComment 0x9286 Exif Undefined 264 Exif.Photo.UserComment 0x9286 Exif Undefined 264 binary comment
Exif.Photo.FlashpixVersion 0xa000 Exif Undefined 4 48 49 48 48 Exif.Photo.FlashpixVersion 0xa000 Exif Undefined 4 48 49 48 48
Exif.Photo.ColorSpace 0xa001 Exif Short 1 1 Exif.Photo.ColorSpace 0xa001 Exif Short 1 1
Exif.Photo.PixelXDimension 0xa002 Exif Short 1 2272 Exif.Photo.PixelXDimension 0xa002 Exif Short 1 2272
@ -526,7 +526,7 @@ Exif.Canon.FileNumber 0x0008 Makernote Long 1
Exif.Canon.OwnerName 0x0009 Makernote Ascii 32 Andreas Huggel Exif.Canon.OwnerName 0x0009 Makernote Ascii 32 Andreas Huggel
Exif.Canon.ModelID 0x0010 Makernote Long 1 17891328 Exif.Canon.ModelID 0x0010 Makernote Long 1 17891328
Exif.Canon.CameraInfo 0x000d Makernote Short 21 42 3 32769 378 32769 0 0 0 259 2 0 10 0 0 0 57 198 5 0 0 0 Exif.Canon.CameraInfo 0x000d Makernote Short 21 42 3 32769 378 32769 0 0 0 259 2 0 10 0 0 0 57 198 5 0 0 0
Exif.Photo.UserComment 0x9286 Exif Undefined 264 Exif.Photo.UserComment 0x9286 Exif Undefined 264 binary comment
Exif.Photo.FlashpixVersion 0xa000 Exif Undefined 4 48 49 48 48 Exif.Photo.FlashpixVersion 0xa000 Exif Undefined 4 48 49 48 48
Exif.Photo.ColorSpace 0xa001 Exif Short 1 1 Exif.Photo.ColorSpace 0xa001 Exif Short 1 1
Exif.Photo.PixelXDimension 0xa002 Exif Short 1 2272 Exif.Photo.PixelXDimension 0xa002 Exif Short 1 2272
@ -656,7 +656,7 @@ Exif.Canon.FileNumber 0x0008 Makernote Long 1
Exif.Canon.OwnerName 0x0009 Makernote Ascii 32 Andreas Huggel Exif.Canon.OwnerName 0x0009 Makernote Ascii 32 Andreas Huggel
Exif.Canon.ModelID 0x0010 Makernote Long 1 17891328 Exif.Canon.ModelID 0x0010 Makernote Long 1 17891328
Exif.Canon.CameraInfo 0x000d Makernote Short 21 42 3 32769 378 32769 0 0 0 259 2 0 10 0 0 0 57 198 5 0 0 0 Exif.Canon.CameraInfo 0x000d Makernote Short 21 42 3 32769 378 32769 0 0 0 259 2 0 10 0 0 0 57 198 5 0 0 0
Exif.Photo.UserComment 0x9286 Exif Undefined 264 Exif.Photo.UserComment 0x9286 Exif Undefined 264 binary comment
Exif.Photo.FlashpixVersion 0xa000 Exif Undefined 4 48 49 48 48 Exif.Photo.FlashpixVersion 0xa000 Exif Undefined 4 48 49 48 48
Exif.Photo.ColorSpace 0xa001 Exif Short 1 1 Exif.Photo.ColorSpace 0xa001 Exif Short 1 1
Exif.Photo.PixelXDimension 0xa002 Exif Short 1 2272 Exif.Photo.PixelXDimension 0xa002 Exif Short 1 2272
@ -819,7 +819,7 @@ Exif.NikonFl1.0x0011 0x0011 Makernote Byte 3
Exif.Nikon3.ImageOptimization 0x00a9 Makernote Ascii 16 NORMAL Exif.Nikon3.ImageOptimization 0x00a9 Makernote Ascii 16 NORMAL
Exif.Nikon3.Saturation 0x00aa Makernote Ascii 16 NORMAL Exif.Nikon3.Saturation 0x00aa Makernote Ascii 16 NORMAL
Exif.Nikon3.VariProgram 0x00ab Makernote Ascii 16 Exif.Nikon3.VariProgram 0x00ab Makernote Ascii 16
Exif.Photo.UserComment 0x9286 Exif Undefined 44 charset="Ascii" Exif.Photo.UserComment 0x9286 Exif Undefined 44 charset=Ascii
Exif.Photo.SubSecTime 0x9290 Exif Ascii 3 00 Exif.Photo.SubSecTime 0x9290 Exif Ascii 3 00
Exif.Photo.SubSecTimeOriginal 0x9291 Exif Ascii 3 00 Exif.Photo.SubSecTimeOriginal 0x9291 Exif Ascii 3 00
Exif.Photo.SubSecTimeDigitized 0x9292 Exif Ascii 3 00 Exif.Photo.SubSecTimeDigitized 0x9292 Exif Ascii 3 00
@ -990,7 +990,7 @@ Exif.NikonFl1.0x0011 0x0011 Makernote Byte 3
Exif.Nikon3.ImageOptimization 0x00a9 Makernote Ascii 16 NORMAL Exif.Nikon3.ImageOptimization 0x00a9 Makernote Ascii 16 NORMAL
Exif.Nikon3.Saturation 0x00aa Makernote Ascii 16 NORMAL Exif.Nikon3.Saturation 0x00aa Makernote Ascii 16 NORMAL
Exif.Nikon3.VariProgram 0x00ab Makernote Ascii 16 Exif.Nikon3.VariProgram 0x00ab Makernote Ascii 16
Exif.Photo.UserComment 0x9286 Exif Undefined 44 charset="Ascii" Exif.Photo.UserComment 0x9286 Exif Undefined 44 charset=Ascii
Exif.Photo.SubSecTime 0x9290 Exif Ascii 3 00 Exif.Photo.SubSecTime 0x9290 Exif Ascii 3 00
Exif.Photo.SubSecTimeOriginal 0x9291 Exif Ascii 3 00 Exif.Photo.SubSecTimeOriginal 0x9291 Exif Ascii 3 00
Exif.Photo.SubSecTimeDigitized 0x9292 Exif Ascii 3 00 Exif.Photo.SubSecTimeDigitized 0x9292 Exif Ascii 3 00
@ -1162,7 +1162,7 @@ Exif.NikonFl1.0x0011 0x0011 Makernote Byte 3
Exif.Nikon3.ImageOptimization 0x00a9 Makernote Ascii 16 NORMAL Exif.Nikon3.ImageOptimization 0x00a9 Makernote Ascii 16 NORMAL
Exif.Nikon3.Saturation 0x00aa Makernote Ascii 16 NORMAL Exif.Nikon3.Saturation 0x00aa Makernote Ascii 16 NORMAL
Exif.Nikon3.VariProgram 0x00ab Makernote Ascii 16 Exif.Nikon3.VariProgram 0x00ab Makernote Ascii 16
Exif.Photo.UserComment 0x9286 Exif Undefined 44 charset="Ascii" Exif.Photo.UserComment 0x9286 Exif Undefined 44 charset=Ascii
Exif.Photo.SubSecTime 0x9290 Exif Ascii 3 00 Exif.Photo.SubSecTime 0x9290 Exif Ascii 3 00
Exif.Photo.SubSecTimeOriginal 0x9291 Exif Ascii 3 00 Exif.Photo.SubSecTimeOriginal 0x9291 Exif Ascii 3 00
Exif.Photo.SubSecTimeDigitized 0x9292 Exif Ascii 3 00 Exif.Photo.SubSecTimeDigitized 0x9292 Exif Ascii 3 00
@ -1334,7 +1334,7 @@ Exif.NikonFl1.0x0011 0x0011 Makernote Byte 3
Exif.Nikon3.ImageOptimization 0x00a9 Makernote Ascii 16 NORMAL Exif.Nikon3.ImageOptimization 0x00a9 Makernote Ascii 16 NORMAL
Exif.Nikon3.Saturation 0x00aa Makernote Ascii 16 NORMAL Exif.Nikon3.Saturation 0x00aa Makernote Ascii 16 NORMAL
Exif.Nikon3.VariProgram 0x00ab Makernote Ascii 16 Exif.Nikon3.VariProgram 0x00ab Makernote Ascii 16
Exif.Photo.UserComment 0x9286 Exif Undefined 44 charset="Ascii" Exif.Photo.UserComment 0x9286 Exif Undefined 44 charset=Ascii
Exif.Photo.SubSecTime 0x9290 Exif Ascii 3 00 Exif.Photo.SubSecTime 0x9290 Exif Ascii 3 00
Exif.Photo.SubSecTimeOriginal 0x9291 Exif Ascii 3 00 Exif.Photo.SubSecTimeOriginal 0x9291 Exif Ascii 3 00
Exif.Photo.SubSecTimeDigitized 0x9292 Exif Ascii 3 00 Exif.Photo.SubSecTimeDigitized 0x9292 Exif Ascii 3 00

File diff suppressed because one or more lines are too long

@ -8,7 +8,7 @@ Exif.GPSInfo.GPSAltitudeRef Byte 1 Below sea level
Exif.GPSInfo.GPSAltitude Rational 1 14.3 m Exif.GPSInfo.GPSAltitude Rational 1 14.3 m
Exif.GPSInfo.GPSTimeStamp Rational 3 09:54:28 Exif.GPSInfo.GPSTimeStamp Rational 3 09:54:28
Exif.GPSInfo.GPSMapDatum Ascii 7 WGS-84 Exif.GPSInfo.GPSMapDatum Ascii 7 WGS-84
Exif.GPSInfo.GPSProcessingMethod Undefined 18 HYBRID-FIX Exif.GPSInfo.GPSProcessingMethod Undefined 18 charset=Ascii HYBRID-FIX
Exif.GPSInfo.GPSDateStamp Ascii 20 2008:05:08 09:54:28 Exif.GPSInfo.GPSDateStamp Ascii 20 2008:05:08 09:54:28
--- deleting the GPSInfo tags --- deleting the GPSInfo tags
--- run geotag --- --- run geotag ---

@ -18,7 +18,7 @@ exiv2-empty.jpg Exif.Image.DateTime Ascii 19
exiv2-empty.jpg Exif.Image.Artist Ascii 17 Vincent van Gogh exiv2-empty.jpg Exif.Image.Artist Ascii 17 Vincent van Gogh
exiv2-empty.jpg Exif.Image.WhitePoint Short 5 32 12 4 5 6 exiv2-empty.jpg Exif.Image.WhitePoint Short 5 32 12 4 5 6
exiv2-empty.jpg Exif.Image.ExifTag Long 1 110 exiv2-empty.jpg Exif.Image.ExifTag Long 1 110
exiv2-empty.jpg Exif.Photo.UserComment Undefined 37 This is an ASCII Exif comment exiv2-empty.jpg Exif.Photo.UserComment Undefined 37 charset=Ascii This is an ASCII Exif comment
File 2/2: exiv2-gc.jpg File 2/2: exiv2-gc.jpg
exiv2-gc.jpg Exif.Image.ImageDescription Ascii 18 Exif JPEG exiv2-gc.jpg Exif.Image.ImageDescription Ascii 18 Exif JPEG
exiv2-gc.jpg Exif.Image.Make Ascii 8 Camera exiv2-gc.jpg Exif.Image.Make Ascii 8 Camera

@ -0,0 +1,326 @@
-----> exiv2-bug443.jpg <-----
Command: exiv2 -pp exiv2-bug443.jpg
Preview 1: image/jpeg, 288x192 pixels, 33779 bytes
Exit code: 0
Command: exiv2 -f -ep exiv2-bug443.jpg
Exit code: 0
-----> exiv2-bug444.jpg <-----
Command: exiv2 -pp exiv2-bug444.jpg
Preview 1: image/jpeg, 160x120 pixels, 4158 bytes
Preview 2: image/jpeg, 320x240 pixels, 16993 bytes
Exit code: 0
Command: exiv2 -f -ep exiv2-bug444.jpg
Exit code: 0
-----> exiv2-bug445.jpg <-----
Command: exiv2 -pp exiv2-bug445.jpg
Preview 1: image/jpeg, 160x120 pixels, 5448 bytes
Exit code: 0
Command: exiv2 -f -ep exiv2-bug445.jpg
Exit code: 0
-----> exiv2-bug447.jpg <-----
Command: exiv2 -pp exiv2-bug447.jpg
Preview 1: image/jpeg, 160x120 pixels, 4093 bytes
Exit code: 0
Command: exiv2 -f -ep exiv2-bug447.jpg
Exit code: 0
-----> exiv2-bug501.jpg <-----
Command: exiv2 -pp exiv2-bug501.jpg
Preview 1: image/jpeg, 120x160 pixels, 6179 bytes
Exit code: 0
Command: exiv2 -f -ep exiv2-bug501.jpg
Exit code: 0
-----> exiv2-bug528.jpg <-----
Command: exiv2 -pp exiv2-bug528.jpg
Preview 1: image/jpeg, 160x94 pixels, 4492 bytes
Exit code: 0
Command: exiv2 -f -ep exiv2-bug528.jpg
Exit code: 0
-----> exiv2-canon-eos-20d.jpg <-----
Command: exiv2 -pp exiv2-canon-eos-20d.jpg
Preview 1: image/jpeg, 160x120 pixels, 6260 bytes
Exit code: 0
Command: exiv2 -f -ep exiv2-canon-eos-20d.jpg
Exit code: 0
-----> exiv2-canon-eos-300d.jpg <-----
Command: exiv2 -pp exiv2-canon-eos-300d.jpg
Preview 1: image/jpeg, 160x120 pixels, 9728 bytes
Exit code: 0
Command: exiv2 -f -ep exiv2-canon-eos-300d.jpg
Exit code: 0
-----> exiv2-canon-eos-d30.jpg <-----
Command: exiv2 -pp exiv2-canon-eos-d30.jpg
Preview 1: image/jpeg, 160x120 pixels, 13824 bytes
Exit code: 0
Command: exiv2 -f -ep exiv2-canon-eos-d30.jpg
Exit code: 0
-----> exiv2-canon-powershot-a520.jpg <-----
Command: exiv2 -pp exiv2-canon-powershot-a520.jpg
Preview 1: image/jpeg, 160x120 pixels, 6137 bytes
Exit code: 0
Command: exiv2 -f -ep exiv2-canon-powershot-a520.jpg
Exit code: 0
-----> exiv2-canon-powershot-s40.crw <-----
Command: exiv2 -pp exiv2-canon-powershot-s40.crw
Preview 1: image/jpeg, 160x120 pixels, 4418 bytes
Exit code: 0
Command: exiv2 -f -ep exiv2-canon-powershot-s40.crw
Exit code: 0
-----> exiv2-fujifilm-finepix-s2pro.jpg <-----
Command: exiv2 -pp exiv2-fujifilm-finepix-s2pro.jpg
Preview 1: image/jpeg, 160x120 pixels, 9573 bytes
Exit code: 0
Command: exiv2 -f -ep exiv2-fujifilm-finepix-s2pro.jpg
Exit code: 0
-----> exiv2-gc.jpg <-----
Command: exiv2 -pp exiv2-gc.jpg
Preview 1: image/jpeg, 133x200 pixels, 6144 bytes
Exit code: 0
Command: exiv2 -f -ep exiv2-gc.jpg
Exit code: 0
-----> exiv2-kodak-dc210.jpg <-----
Command: exiv2 -pp exiv2-kodak-dc210.jpg
Preview 1: image/tiff, 96x72 pixels, 20916 bytes
Exit code: 0
Command: exiv2 -f -ep exiv2-kodak-dc210.jpg
Exit code: 0
-----> exiv2-nikon-d70.jpg <-----
Command: exiv2 -pp exiv2-nikon-d70.jpg
Preview 1: image/jpeg, 160x120 pixels, 8930 bytes
Preview 2: image/jpeg, 564x372 pixels, 27773 bytes
Exit code: 0
Command: exiv2 -f -ep exiv2-nikon-d70.jpg
Exit code: 0
-----> exiv2-nikon-e950.jpg <-----
Command: exiv2 -pp exiv2-nikon-e950.jpg
Preview 1: image/jpeg, 160x120 pixels, 4662 bytes
Exit code: 0
Command: exiv2 -f -ep exiv2-nikon-e950.jpg
Exit code: 0
-----> exiv2-nikon-e990.jpg <-----
Command: exiv2 -pp exiv2-nikon-e990.jpg
Preview 1: image/jpeg, 160x120 pixels, 7829 bytes
Exit code: 0
Command: exiv2 -f -ep exiv2-nikon-e990.jpg
Exit code: 0
-----> exiv2-olympus-c8080wz.jpg <-----
Command: exiv2 -pp exiv2-olympus-c8080wz.jpg
Preview 1: image/jpeg, 160x120 pixels, 7306 bytes
Exit code: 0
Command: exiv2 -f -ep exiv2-olympus-c8080wz.jpg
Exit code: 0
-----> exiv2-panasonic-dmc-fz5.jpg <-----
Command: exiv2 -pp exiv2-panasonic-dmc-fz5.jpg
Preview 1: image/jpeg, 160x120 pixels, 10308 bytes
Exit code: 0
Command: exiv2 -f -ep exiv2-panasonic-dmc-fz5.jpg
Exit code: 0
-----> exiv2-photoshop.psd <-----
Command: exiv2 -pp exiv2-photoshop.psd
Preview 1: image/jpeg, 150x91 pixels, 4669 bytes
Exit code: 0
Command: exiv2 -f -ep exiv2-photoshop.psd
Exit code: 0
-----> exiv2-pre-in-xmp.xmp <-----
Command: exiv2 -pp exiv2-pre-in-xmp.xmp
Preview 1: image/jpeg, 150x91 pixels, 4745 bytes
Exit code: 0
Command: exiv2 -f -ep exiv2-pre-in-xmp.xmp
Exit code: 0
-----> exiv2-sigma-d10.jpg <-----
Command: exiv2 -pp exiv2-sigma-d10.jpg
Preview 1: image/jpeg, 160x106 pixels, 11998 bytes
Exit code: 0
Command: exiv2 -f -ep exiv2-sigma-d10.jpg
Exit code: 0
-----> exiv2-sony-dsc-w7.jpg <-----
Command: exiv2 -pp exiv2-sony-dsc-w7.jpg
Preview 1: image/jpeg, 160x120 pixels, 15605 bytes
Exit code: 0
Command: exiv2 -f -ep exiv2-sony-dsc-w7.jpg
Exit code: 0
-----> glider.exv <-----
Command: exiv2 -pp glider.exv
Preview 1: image/jpeg, 160x120 pixels, 5333 bytes
Exit code: 0
Command: exiv2 -f -ep glider.exv
Exit code: 0
-----> imagemagick.pgf <-----
Command: exiv2 -pp imagemagick.pgf
Preview 1: image/jpeg, 160x105 pixels, 4363 bytes
Exit code: 0
Command: exiv2 -f -ep imagemagick.pgf
Exit code: 0
-----> iptc-psAPP13-noIPTC-psAPP13-wIPTC.jpg <-----
Command: exiv2 -pp iptc-psAPP13-noIPTC-psAPP13-wIPTC.jpg
Preview 1: image/jpeg, 160x114 pixels, 938 bytes
Exit code: 0
Command: exiv2 -f -ep iptc-psAPP13-noIPTC-psAPP13-wIPTC.jpg
Exit code: 0
-----> iptc-psAPP13-noIPTC.jpg <-----
Command: exiv2 -pp iptc-psAPP13-noIPTC.jpg
Preview 1: image/jpeg, 160x114 pixels, 938 bytes
Exit code: 0
Command: exiv2 -f -ep iptc-psAPP13-noIPTC.jpg
Exit code: 0
-----> iptc-psAPP13-wIPTC-psAPP13-noIPTC.jpg <-----
Command: exiv2 -pp iptc-psAPP13-wIPTC-psAPP13-noIPTC.jpg
Preview 1: image/jpeg, 160x114 pixels, 938 bytes
Exit code: 0
Command: exiv2 -f -ep iptc-psAPP13-wIPTC-psAPP13-noIPTC.jpg
Exit code: 0
-----> iptc-psAPP13-wIPTC1-psAPP13-wIPTC2.jpg <-----
Command: exiv2 -pp iptc-psAPP13-wIPTC1-psAPP13-wIPTC2.jpg
Preview 1: image/jpeg, 160x114 pixels, 938 bytes
Exit code: 0
Command: exiv2 -f -ep iptc-psAPP13-wIPTC1-psAPP13-wIPTC2.jpg
Exit code: 0
-----> iptc-psAPP13-wIPTCbeg.jpg <-----
Command: exiv2 -pp iptc-psAPP13-wIPTCbeg.jpg
Preview 1: image/jpeg, 160x114 pixels, 938 bytes
Exit code: 0
Command: exiv2 -f -ep iptc-psAPP13-wIPTCbeg.jpg
Exit code: 0
-----> iptc-psAPP13-wIPTCempty-psAPP13-wIPTC.jpg <-----
Command: exiv2 -pp iptc-psAPP13-wIPTCempty-psAPP13-wIPTC.jpg
Preview 1: image/jpeg, 160x114 pixels, 938 bytes
Exit code: 0
Command: exiv2 -f -ep iptc-psAPP13-wIPTCempty-psAPP13-wIPTC.jpg
Exit code: 0
-----> iptc-psAPP13-wIPTCempty.jpg <-----
Command: exiv2 -pp iptc-psAPP13-wIPTCempty.jpg
Preview 1: image/jpeg, 160x114 pixels, 938 bytes
Exit code: 0
Command: exiv2 -f -ep iptc-psAPP13-wIPTCempty.jpg
Exit code: 0
-----> iptc-psAPP13-wIPTCend.jpg <-----
Command: exiv2 -pp iptc-psAPP13-wIPTCend.jpg
Preview 1: image/jpeg, 160x114 pixels, 938 bytes
Exit code: 0
Command: exiv2 -f -ep iptc-psAPP13-wIPTCend.jpg
Exit code: 0
-----> iptc-psAPP13-wIPTCmid.jpg <-----
Command: exiv2 -pp iptc-psAPP13-wIPTCmid.jpg
Preview 1: image/jpeg, 160x114 pixels, 938 bytes
Exit code: 0
Command: exiv2 -f -ep iptc-psAPP13-wIPTCmid.jpg
Exit code: 0
-----> iptc-psAPP13-wIPTCmid1-wIPTCempty-wIPTCmid2.jpg <-----
Command: exiv2 -pp iptc-psAPP13-wIPTCmid1-wIPTCempty-wIPTCmid2.jpg
Preview 1: image/jpeg, 160x114 pixels, 938 bytes
Exit code: 0
Command: exiv2 -f -ep iptc-psAPP13-wIPTCmid1-wIPTCempty-wIPTCmid2.jpg
Exit code: 0
-----> smiley2.jpg <-----
Command: exiv2 -pp smiley2.jpg
Preview 1: image/jpeg, 160x120 pixels, 7289 bytes
Exit code: 0
Command: exiv2 -f -ep smiley2.jpg
Exit code: 0

@ -2,7 +2,11 @@
# Test driver for exiv2 utility tests # Test driver for exiv2 utility tests
source ./functions.source source ./functions.source
diffargs="-w --text $diffargs" if [ "$PLATFORM" == SunOS -o "$PLATFORM" == FreeBSD -o "$PLATFORM" == NetBSD ] ; then
diffargs="-w $diffargs"
else
diffargs="-w --text $diffargs"
fi
( cd "$testdir" ( cd "$testdir"
@ -66,7 +70,7 @@ diffargs="-w --text $diffargs"
echo echo
echo "Exiv2 version ------------------------------------------------------------" echo "Exiv2 version ------------------------------------------------------------"
# Tweak this to avoid a maintenance headache with test/data/exiv2-test.out # Tweak this to avoid a maintenance headache with test/data/exiv2-test.out
runTest exiv2 -u -V | sed -E -e 's#^exiv2.*$#exiv2 0.27.0.0 (__ bit build)#' runTest exiv2 -u -V | sed -e 's#^exiv2.*$#exiv2 0.27.0.0 (__ bit build)#'
echo echo
echo "Exiv2 help ---------------------------------------------------------------" echo "Exiv2 help ---------------------------------------------------------------"
runTest exiv2 -u -h runTest exiv2 -u -h

@ -139,7 +139,7 @@ runTestCase()
runTest exifprint $rtc_infile > iii; runTest exifprint $rtc_infile > iii;
cp $rtc_infile $rtc_outfile; cp $rtc_infile $rtc_outfile;
runTest write-test $rtc_infile $rtc_number > ttt; runTest write-test $rtc_infile $rtc_number > ttt;
diff -a iii ttt diff $diffargs iii ttt
} }
## ##
@ -227,8 +227,10 @@ diffCheck()
if [ -z "$errors" ]; then let -a errors=0; fi if [ -z "$errors" ]; then let -a errors=0; fi
#run diff and check results #run diff and check results
if [ $(uname) == FreeBSD -o $(uname) == NetBSD -o $(uname) == SunOS ]; then if [ "$PLATFORM" == SunOS ]; then
bdiff $diffargs "$test" "$good" bdiff $diffargs "$test" "$good"
elif [ "$PLATFORM" == FreeBSD -o "$PLATFORM" == NetBSD ]; then
diff $diffargs "$test" "$good"
else else
diff --binary $diffargs "$test" "$good" diff --binary $diffargs "$test" "$good"
fi fi
@ -430,7 +432,7 @@ checkSum()
if [ "$platform" == 'NetBSD' -o "$platform" == 'FreeBSD' ]; then if [ "$platform" == 'NetBSD' -o "$platform" == 'FreeBSD' ]; then
md5 -q $1 md5 -q $1
else else
md5sum $1 | cut -d' ' -f 1 md5sum $1 | cut -f 1 -d' '
fi fi
} }
@ -494,6 +496,7 @@ prepareTest()
# figure out arguments for diff # figure out arguments for diff
good="$here/data/${this}.out" good="$here/data/${this}.out"
results="$here/tmp/${this}.out" results="$here/tmp/${this}.out"
mkdir -p $here/tmp
tmpfile=$here/tmp/$this tmpfile=$here/tmp/$this
echo '' >> $tmpfile echo '' >> $tmpfile

@ -55,7 +55,7 @@ source ./functions.source
echo echo
echo "Command: exiv2 -pp $filename" echo "Command: exiv2 -pp $filename"
runTest exiv2 -pp "$filename" runTest exiv2 -pp "$filename" 2>/dev/null
exitcode=$? exitcode=$?
echo "Exit code: $exitcode" echo "Exit code: $exitcode"
@ -63,25 +63,22 @@ source ./functions.source
echo echo
echo "Command: exiv2 -f -ep $filename" echo "Command: exiv2 -f -ep $filename"
runTest exiv2 -f -ep "$filename" runTest exiv2 -f -ep "$filename" 2>/dev/null
echo "Exit code: $?" echo "Exit code: $?"
runTest exiv2 -pp "$filename" 2>/dev/null | sed -n 's,^Preview \([0-9]\+\):.*,\1,p' | while read preview; do runTest exiv2 -pp "$filename" 2>/dev/null | sed -n 's,^Preview \([0-9]\+\):.*,\1,p' | while read preview; do
diff $diffargs -q "../data/preview/$image-preview$preview."* "$image-preview$preview."* if [ $(uname) == SunOS ]; then
bdiff "../data/preview/$image-preview$preview."* "$image-preview$preview."*
else
diff $diffargs -q "../data/preview/$image-preview$preview."* "$image-preview$preview."*
fi
done done
done done
) 3>&1 > "$testdir/preview-test.out" 2>&1 ) 3>&1 > "$testdir/preview-test.out" 2>&1
echo "." echo "."
# ---------------------------------------------------------------------- reportTest
# Result
if ! diff -q $diffargs "$testdir/$datadir/preview/preview-test.out" "$testdir/preview-test.out" ; then
diff -u $diffargs "$testdir/$datadir/preview/preview-test.out" "$testdir/preview-test.out"
exit 1
fi
echo "All testcases passed."
# That's all Folks! # That's all Folks!
## ##

@ -21,10 +21,10 @@ exifprobe()
lens=() lens=()
vals=() vals=()
while read line; do while read line; do
tag=$(echo $line|cut -d. -f 3 | cut -d' ' -f 1) ; tags+=($tag) tag=$(echo $line|cut -f 3 -d. | cut -f 1 -d' ' ) ; tags+=($tag)
typ=$(echo $line|cut -d' ' -f 2- | sed -E -e 's/ +/ /g' -e 's/^ //' | cut -d' ' -f 1 ); typs+=($typ) typ=$(echo $line|cut -f 2- -d' ' | sed -e 's/ +/ /g' -e 's/^ //' | cut -f 1 -d' ' ); typs+=($typ)
len=$(echo $line|cut -d' ' -f 2- | sed -E -e 's/ +/ /g' -e 's/^ //' | cut -d' ' -f 2 ); lens+=($len) len=$(echo $line|cut -f 2- -d' ' | sed -e 's/ +/ /g' -e 's/^ //' | cut -f 2 -d' ' ); lens+=($len)
val=$(echo $line|cut -d' ' -f 2- | sed -E -e 's/ +/ /g' -e 's/^ //' | cut -d' ' -f 3-); vals+=("$val") val=$(echo $line|cut -f 2- -d' ' | sed -e 's/ +/ /g' -e 's/^ //' | cut -f 3- -d' ' ); vals+=("$val")
done < <( runTest exiv2 -pa $f 2>/dev/null ) # process pipe done < <( runTest exiv2 -pa $f 2>/dev/null ) # process pipe
count=${#tags[@]} count=${#tags[@]}
@ -51,13 +51,13 @@ exifprobe()
while read line; do while read line; do
k=$((k+1)) # skip the first couple of lines k=$((k+1)) # skip the first couple of lines
if [ $k -gt 2 ]; then if [ $k -gt 2 ]; then
TAG=$(echo $line| cut -d'|' -f 2 | cut -d' ' -f 3 ); TAGS+=($TAG); TAG=$(echo $line| cut -f 2 -d'|' | cut -f 3 -d' ' ); TAGS+=($TAG);
TYP=$(echo $line| cut -d'|' -f 3 | sed -E -e's/ +//g'); TYPS+=($TYP) TYP=$(echo $line| cut -f 3 -d'|' | sed -e's/ +//g' ); TYPS+=($TYP)
LEN=$(echo $line| cut -d'|' -f 4 | sed -E -e's/ +//g'); LENS+=($LEN) LEN=$(echo $line| cut -f 4 -d'|' | sed -e's/ +//g' ); LENS+=($LEN)
OFF=$(echo $line| cut -d'|' -f 5 | sed -E -e's/ +//g'); OFFS+=($OFF) OFF=$(echo $line| cut -f 5 -d'|' | sed -e's/ +//g' ); OFFS+=($OFF)
VAL=$(echo $line| cut -d'|' -f 6- | sed -e's/^ //' ); VALS+=($"$VAL") VAL=$(echo $line| cut -f 6- -d'|' | sed -e's/^ //' ); VALS+=($"$VAL")
fi fi
done < <( runTest exiv2 -pS $f | grep -v -e '^END' 2>/dev/null ) done < <( runTest exiv2 -pS $f | grep -v '^END' 2>/dev/null )
COUNT=${#TAGS[@]} COUNT=${#TAGS[@]}
echo '' echo ''

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Test driver for exiv2.exe --verbose --version # driver for $ make unit_test
( source ./functions.source ; runTest unit_tests --gtest_color=no | grep -v "Warning: Unsupported date format") ( source ./functions.source ; runTest unit_tests --gtest_color=no 2>&1 | grep -v "Warning: Unsupported .... format" )
# That's all Folks! # That's all Folks!
## ##

@ -2,6 +2,10 @@
# XMP parser test driver # XMP parser test driver
source ./functions.source source ./functions.source
if [ "$PLATFORM" == "SunOS" ]; then
echo "platform $PLATFORM Skip $0"
exit 0 # SunOS diff complains about newline stuff
fi
## ##
# Check if xmpparser-test exists # Check if xmpparser-test exists

@ -8,7 +8,7 @@ class TestCvePoC(metaclass=system_tests.CaseMeta):
url = "https://github.com/Exiv2/exiv2/issues/54" url = "https://github.com/Exiv2/exiv2/issues/54"
filename = "$data_path/POC7" filename = "$data_path/POC7"
commands = ["$exiv2 $filename"] commands = ["$exiv2 -b $filename"]
stdout = [ stdout = [
"""File name : $filename """File name : $filename
File size : 632 Bytes File size : 632 Bytes

@ -15,7 +15,7 @@ Error: Offset of directory Image, entry 0x0117 is out of bounds: Offset = 0x3030
filename = "$data_path/cve_2017_18005_reproducer.tiff" filename = "$data_path/cve_2017_18005_reproducer.tiff"
commands = [ commands = [
"$exiv2 -vPEIXxgklnycsvth " + filename, "$exiv2 -vPEIXxgklnycsvth -b " + filename,
"$exiv2json " + filename "$exiv2json " + filename
] ]

@ -7,23 +7,23 @@ class test_issue_1046Test(metaclass=CaseMeta):
filename = path("$data_path/IMG_0246_copy.exv") 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! # 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" commands = [ "$exiv2 -pt -b -g GPSInfo -g UserCom $filename"
, "$exiv2 -pv -g GPSInfo -g UserCom $filename" , "$exiv2 -pv -b -g GPSInfo -g UserCom $filename"
,"""$exiv2 -M"set Exif.Photo.UserComment charset=Ascii how now brown cow" $filename""" ,"""$exiv2 -M"set Exif.Photo.UserComment charset=Ascii how now brown cow" $filename"""
, "$exiv2 -pt -g UserComment $filename" , "$exiv2 -pt -b -g UserComment $filename"
, "$exiv2 -pv -g UserComment $filename" , "$exiv2 -pv -b -g UserComment $filename"
,"""$exiv2 -M"set Exif.Photo.UserComment charset=Unicode \u0041\u0042" $filename""" ,"""$exiv2 -M"set Exif.Photo.UserComment charset=Unicode \u0041\u0042" $filename"""
, "$exiv2 -pt -g UserComment $filename" , "$exiv2 -pt -b -g UserComment $filename"
, "$exiv2 -pv -g UserComment $filename" , "$exiv2 -pv -b -g UserComment $filename"
,"""$exiv2 -M"set Exif.Photo.UserComment hello world" $filename""" ,"""$exiv2 -M"set Exif.Photo.UserComment hello world" $filename"""
, "$exiv2 -pt -g UserComment $filename" , "$exiv2 -pt -b -g UserComment $filename"
, "$exiv2 -pv -g UserComment $filename" , "$exiv2 -pv -b -g UserComment $filename"
,"""$exiv2 -M"set Exif.GPSInfo.GPSProcessingMethod charset=Unicode \u0052\u006f\u0062\u0069\u006e" $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 -M"set Exif.GPSInfo.GPSAreaInformation charset=Ascii area information" $filename"""
, "$exiv2 -pt -g GPSPro -g GPSArea $filename" , "$exiv2 -pt -b -g GPSPro -g GPSArea $filename"
, "$exiv2 -pv -g GPSPro -g GPSArea $filename" , "$exiv2 -pv -b -g GPSPro -g GPSArea $filename"
] ]
stdout = ["""Exif.Photo.UserComment Undefined 12 AB stdout = ["""Exif.Photo.UserComment Undefined 12 charset=Unicode AB
Exif.GPSInfo.GPSVersionID Byte 4 2.2.0.0 Exif.GPSInfo.GPSVersionID Byte 4 2.2.0.0
Exif.GPSInfo.GPSLatitudeRef Ascii 2 North Exif.GPSInfo.GPSLatitudeRef Ascii 2 North
Exif.GPSInfo.GPSLatitude Rational 3 51deg 23' 13" Exif.GPSInfo.GPSLatitude Rational 3 51deg 23' 13"
@ -33,10 +33,10 @@ Exif.GPSInfo.GPSAltitudeRef Byte 1 Above sea level
Exif.GPSInfo.GPSAltitude Rational 1 104.2 m Exif.GPSInfo.GPSAltitude Rational 1 104.2 m
Exif.GPSInfo.GPSTimeStamp Rational 3 10:34:11 Exif.GPSInfo.GPSTimeStamp Rational 3 10:34:11
Exif.GPSInfo.GPSMapDatum Ascii 7 WGS-84 Exif.GPSInfo.GPSMapDatum Ascii 7 WGS-84
Exif.GPSInfo.GPSProcessingMethod Undefined 18 HYBRID-FIX Exif.GPSInfo.GPSProcessingMethod Undefined 18 charset=Ascii HYBRID-FIX
Exif.GPSInfo.GPSAreaInformation Undefined 23 Surrey, England Exif.GPSInfo.GPSAreaInformation Undefined 23 Surrey, England
Exif.GPSInfo.GPSDateStamp Ascii 20 2020:02:02 10:34:11 Exif.GPSInfo.GPSDateStamp Ascii 20 2020:02:02 10:34:11
""","""0x9286 Photo UserComment Undefined 12 charset="Unicode" AB ""","""0x9286 Photo UserComment Undefined 12 charset=Unicode AB
0x0000 GPSInfo GPSVersionID Byte 4 2 2 0 0 0x0000 GPSInfo GPSVersionID Byte 4 2 2 0 0
0x0001 GPSInfo GPSLatitudeRef Ascii 2 N 0x0001 GPSInfo GPSLatitudeRef Ascii 2 N
0x0002 GPSInfo GPSLatitude Rational 3 51/1 23/1 13/1 0x0002 GPSInfo GPSLatitude Rational 3 51/1 23/1 13/1
@ -46,19 +46,19 @@ Exif.GPSInfo.GPSDateStamp Ascii 20 2020:02:02 10:34:11
0x0006 GPSInfo GPSAltitude Rational 1 10420/100 0x0006 GPSInfo GPSAltitude Rational 1 10420/100
0x0007 GPSInfo GPSTimeStamp Rational 3 10/1 34/1 11/1 0x0007 GPSInfo GPSTimeStamp Rational 3 10/1 34/1 11/1
0x0012 GPSInfo GPSMapDatum Ascii 7 WGS-84 0x0012 GPSInfo GPSMapDatum Ascii 7 WGS-84
0x001b GPSInfo GPSProcessingMethod Undefined 18 charset="Ascii" HYBRID-FIX 0x001b GPSInfo GPSProcessingMethod Undefined 18 charset=Ascii HYBRID-FIX
0x001c GPSInfo GPSAreaInformation Undefined 23 Surrey, England 0x001c GPSInfo GPSAreaInformation Undefined 23 Surrey, England
0x001d GPSInfo GPSDateStamp Ascii 20 2020:02:02 10:34:11 0x001d GPSInfo GPSDateStamp Ascii 20 2020:02:02 10:34:11
""","","""Exif.Photo.UserComment Undefined 25 how now brown cow ""","","""Exif.Photo.UserComment Undefined 25 charset=Ascii how now brown cow
""","""0x9286 Photo UserComment Undefined 25 charset="Ascii" how now brown cow ""","""0x9286 Photo UserComment Undefined 25 charset=Ascii how now brown cow
""","","""Exif.Photo.UserComment Undefined 12 AB ""","","""Exif.Photo.UserComment Undefined 12 charset=Unicode AB
""","""0x9286 Photo UserComment Undefined 12 charset="Unicode" AB ""","""0x9286 Photo UserComment Undefined 12 charset=Unicode AB
""","","""Exif.Photo.UserComment Undefined 19 hello world ""","","""Exif.Photo.UserComment Undefined 19 hello world
""","""0x9286 Photo UserComment Undefined 19 hello world ""","""0x9286 Photo UserComment Undefined 19 hello world
""","","","""Exif.GPSInfo.GPSProcessingMethod Undefined 18 Robin ""","","","""Exif.GPSInfo.GPSProcessingMethod Undefined 18 charset=Unicode Robin
Exif.GPSInfo.GPSAreaInformation Undefined 24 area information Exif.GPSInfo.GPSAreaInformation Undefined 24 charset=Ascii area information
""","""0x001b GPSInfo GPSProcessingMethod Undefined 18 charset="Unicode" Robin ""","""0x001b GPSInfo GPSProcessingMethod Undefined 18 charset=Unicode Robin
0x001c GPSInfo GPSAreaInformation Undefined 24 charset="Ascii" area information 0x001c GPSInfo GPSAreaInformation Undefined 24 charset=Ascii area information
""" """
] ]
stderr = [""]*len(commands) stderr = [""]*len(commands)

@ -10,7 +10,7 @@ class TestFirstPoC(metaclass=system_tests.CaseMeta):
url = "https://github.com/Exiv2/exiv2/issues/247" url = "https://github.com/Exiv2/exiv2/issues/247"
filename = "$data_path/2-invalid-memory-access" filename = "$data_path/2-invalid-memory-access"
commands = ["$exiv2 -pt " + filename] commands = ["$exiv2 -pt -b " + filename]
stdout = [ stdout = [
"""Exif.Image.Make Ascii 6 Canon """Exif.Image.Make Ascii 6 Canon
Exif.Image.Orientation Short 1 top, left Exif.Image.Orientation Short 1 top, left
@ -34,7 +34,7 @@ Exif.Photo.MaxApertureValue Rational 1 F2.8
Exif.Photo.MeteringMode Short 1 Center weighted average Exif.Photo.MeteringMode Short 1 Center weighted average
Exif.Photo.Flash Short 1 No, auto Exif.Photo.Flash Short 1 No, auto
Exif.Photo.FocalLength Rational 1 21.3 mm Exif.Photo.FocalLength Rational 1 21.3 mm
Exif.Photo.MakerNote Undefined 450 (Binary value suppressed) Exif.Photo.MakerNote Undefined 450 12 0 1 0 3 0 40 0 0 0 68 4 0 0 2 0 3 0 4 0 0 0 148 4 0 0 3 0 3 0 4 0 0 0 156 4 0 0 4 0 3 0 27 0 0 0 164 4 0 0 0 0 3 0 6 0 0 0 218 4 0 0 0 0 3 0 4 0 0 0 230 4 0 0 6 0 2 0 32 0 0 0 238 4 0 0 7 0 2 0 24 0 0 0 14 5 0 0 8 0 4 0 1 0 0 0 59 225 17 0 9 0 2 0 32 0 0 0 38 5 0 0 16 0 4 0 1 0 0 0 0 0 17 1 13 0 3 0 21 0 0 0 70 5 0 0 0 0 0 0 80 0 2 0 0 0 5 0 1 0 0 0 0 0 4 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 17 0 5 0 1 0 3 48 1 0 255 255 255 255 170 2 227 0 32 0 149 0 192 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 49 0 224 8 224 8 0 0 1 0 2 0 170 2 30 1 215 0 0 0 0 0 0 0 0 0 54 0 0 0 160 0 20 1 149 0 31 1 0 0 0 0 0 0 0 0 6 0 0 0 0 0 0 0 2 48 0 0 0 0 0 0 1 0 14 3 0 0 149 0 33 1 0 0 0 0 0 0 250 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 73 77 71 58 80 111 119 101 114 83 104 111 116 32 83 52 48 32 74 80 69 71 0 0 0 0 0 0 0 0 0 0 70 105 114 109 119 97 114 101 32 86 101 114 115 105 111 110 32 49 46 49 48 0 0 0 65 110 100 114 101 97 115 32 72 117 103 103 101 108 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 42 0 3 0 1 128 122 1 1 128 0 0 0 0 0 0 3 1 2 0 0 0 10 0 0 0 0 0 0 0 57 0 198 0 5 0 0 0 0 0 0 0
Exif.MakerNote.Offset Long 1 942 Exif.MakerNote.Offset Long 1 942
Exif.MakerNote.ByteOrder Ascii 3 II Exif.MakerNote.ByteOrder Ascii 3 II
Exif.CanonCs.Macro Short 1 Off Exif.CanonCs.Macro Short 1 Off
@ -93,7 +93,7 @@ Exif.Canon.FileNumber Long 1 117-1771
Exif.Canon.OwnerName Ascii 32 Andreas Huggel Exif.Canon.OwnerName Ascii 32 Andreas Huggel
Exif.Canon.ModelID Long 1 PowerShot S40 Exif.Canon.ModelID Long 1 PowerShot S40
Exif.Canon.CameraInfo Short 21 42 3 32769 378 32769 0 0 0 259 2 0 10 0 0 0 57 198 5 0 0 0 Exif.Canon.CameraInfo Short 21 42 3 32769 378 32769 0 0 0 259 2 0 10 0 0 0 57 198 5 0 0 0
Exif.Photo.UserComment Undefined 264 (Binary value suppressed) Exif.Photo.UserComment Undefined 264 binary comment
Exif.Photo.FlashpixVersion Undefined 4 1.00 Exif.Photo.FlashpixVersion Undefined 4 1.00
Exif.Photo.ColorSpace Short 1 sRGB Exif.Photo.ColorSpace Short 1 sRGB
Exif.Photo.PixelXDimension Short 1 2272 Exif.Photo.PixelXDimension Short 1 2272

@ -14,7 +14,7 @@ class OutOfMemoryInPsdImageReadMetadata(metaclass=CaseMeta):
url = "https://github.com/Exiv2/exiv2/issues/855" url = "https://github.com/Exiv2/exiv2/issues/855"
filename = path("$data_path/issue_855_poc.psd") filename = path("$data_path/issue_855_poc.psd")
commands = ["$exiv2 $filename"] commands = ["$exiv2 -b $filename"]
stdout = [""] stdout = [""]
stderr = ["""Warning: Failed to decode IPTC metadata. stderr = ["""Warning: Failed to decode IPTC metadata.
Exiv2 exception in print action for file $filename: Exiv2 exception in print action for file $filename:

@ -8,12 +8,12 @@ class CanonAfInfoTest(metaclass=CaseMeta):
filenameB = path("$data_path/test_issue_981b.exv") filenameB = path("$data_path/test_issue_981b.exv")
filenameC = path("$data_path/test_issue_981c.exv") filenameC = path("$data_path/test_issue_981c.exv")
filenameD = path("$data_path/test_issue_981d.exv") filenameD = path("$data_path/test_issue_981d.exv")
commands = ["$exiv2 -pa --grep Canon.AF $filenameA", commands = ["$exiv2 -pa -b --grep Canon.AF $filenameA",
"$exiv2 -pa --grep Canon.AF $filenameB", "$exiv2 -pa -b --grep Canon.AF $filenameB",
"$exiv2 -pv --grep Points $filenameC", "$exiv2 -pv -b --grep Points $filenameC",
"$exiv2 -pt --grep Points $filenameC", "$exiv2 -pt -b --grep Points $filenameC",
"$exiv2 -pv --grep Unusable $filenameD", "$exiv2 -pv -b --grep Unusable $filenameD",
"$exiv2 -pt --grep Unusable $filenameD", "$exiv2 -pt -b --grep Unusable $filenameD",
] ]
stdout = ["""Exif.Canon.AFInfo Short 48 96 2 9 9 4752 3168 4272 2848 115 115 115 162 200 162 115 115 115 153 153 153 105 199 105 153 153 153 64409 64862 64862 0 0 0 674 674 1127 0 321 65215 603 0 64933 321 65215 0 16 256 0 65535 stdout = ["""Exif.Canon.AFInfo Short 48 96 2 9 9 4752 3168 4272 2848 115 115 115 162 200 162 115 115 115 153 153 153 105 199 105 153 153 153 64409 64862 64862 0 0 0 674 674 1127 0 321 65215 603 0 64933 321 65215 0 16 256 0 65535

@ -5,7 +5,7 @@ import system_tests
class ShadowingError(metaclass=system_tests.CaseMeta): class ShadowingError(metaclass=system_tests.CaseMeta):
commands = ["$exiv2 -PE $data_path/IMGP0020.exv"] commands = ["$exiv2 -PE -b $data_path/IMGP0020.exv"]
stdout = [""] stdout = [""]
stderr = [""] stderr = [""]
retval = [0] retval = [0]

@ -8,7 +8,7 @@ class IPTCtimeWithoutTimeZone(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/440" url = "http://dev.exiv2.org/issues/440"
filename = "$data_path/exiv2-bug440.jpg" filename = "$data_path/exiv2-bug440.jpg"
commands = ["$exiv2 -u -pi $filename"] commands = ["$exiv2 -u -b -pi $filename"]
stdout = ["""Iptc.Application2.RecordVersion Short 1 1 stdout = ["""Iptc.Application2.RecordVersion Short 1 1
Iptc.Application2.ObjectName String 16 WHITE SOX TIGERS Iptc.Application2.ObjectName String 16 WHITE SOX TIGERS
Iptc.Application2.Category String 1 S Iptc.Application2.Category String 1 S

@ -15,13 +15,13 @@ class CheckPentaxK10(metaclass=system_tests.CaseMeta):
"$data_path/exiv2-bug1144g.exv", "$data_path/exiv2-bug1144g.exv",
] ]
commands = [ "$exiv2 -pa -g Lens " + filenames[0], commands = [ "$exiv2 -pa -b -g Lens " + filenames[0],
"$exiv2 -pa -g Lens " + filenames[1], "$exiv2 -pa -b -g Lens " + filenames[1],
"$exiv2 -pa -g Lens " + filenames[2], "$exiv2 -pa -b -g Lens " + filenames[2],
"$exiv2 -pa -g Lens " + filenames[3], "$exiv2 -pa -b -g Lens " + filenames[3],
"$exiv2 -pa -g Lens " + filenames[4], "$exiv2 -pa -b -g Lens " + filenames[4],
"$exiv2 -pa -g Lens " + filenames[5], "$exiv2 -pa -b -g Lens " + filenames[5],
"$exiv2 -pa -g Lens " + filenames[6], "$exiv2 -pa -b -g Lens " + filenames[6],
] ]
stdout = [ """Exif.PentaxDng.LensType Byte 3 Sigma AF 10-20mm F4-5.6 EX DC stdout = [ """Exif.PentaxDng.LensType Byte 3 Sigma AF 10-20mm F4-5.6 EX DC

@ -17,15 +17,15 @@ class CheckPentaxK3(metaclass=system_tests.CaseMeta):
"$data_path/exiv2-bug1155i.exv", "$data_path/exiv2-bug1155i.exv",
] ]
commands = [ "$exiv2 -pa -g Lens " + filenames[0], commands = [ "$exiv2 -pa -b -g Lens " + filenames[0],
"$exiv2 -pa -g Lens " + filenames[1], "$exiv2 -pa -b -g Lens " + filenames[1],
"$exiv2 -pa -g Lens " + filenames[2], "$exiv2 -pa -b -g Lens " + filenames[2],
"$exiv2 -pa -g Lens " + filenames[3], "$exiv2 -pa -b -g Lens " + filenames[3],
"$exiv2 -pa -g Lens " + filenames[4], "$exiv2 -pa -b -g Lens " + filenames[4],
"$exiv2 -pa -g Lens " + filenames[5], "$exiv2 -pa -b -g Lens " + filenames[5],
"$exiv2 -pa -g Lens " + filenames[6], "$exiv2 -pa -b -g Lens " + filenames[6],
"$exiv2 -pa -g Lens " + filenames[7], "$exiv2 -pa -b -g Lens " + filenames[7],
"$exiv2 -pa -g Lens " + filenames[8], "$exiv2 -pa -b -g Lens " + filenames[8],
] ]
stdout = [ """Exif.PentaxDng.LensType Byte 4 Sigma 70-300mm F4-5.6 Macro stdout = [ """Exif.PentaxDng.LensType Byte 4 Sigma 70-300mm F4-5.6 Macro

@ -8,7 +8,7 @@ class CheckShutterInPentax(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/1242" url = "http://dev.exiv2.org/issues/1242"
filename = "$data_path/Reagan.jp2" filename = "$data_path/Reagan.jp2"
commands = ["$exiv2 -pa $filename"] commands = ["$exiv2 -pa -b $filename"]
stdout = [r"""Exif.Image.ImageDescription Ascii 403 040621-N-6536T-062 stdout = [r"""Exif.Image.ImageDescription Ascii 403 040621-N-6536T-062
USS Ronald Reagan (CVN 76), June 21, 2004 - USS Ronald Reagan (CVN 76) sails through the Straits of Magellan on its way to the Pacific Ocean. The Navyís newest aircraft carrier is underway circumnavigating South America in transit to its new homeport of San Diego. U.S. Navy photo by Photographerís Mate 3rd Class (AW) Elizabeth Thompson. (RELEASE) USS Ronald Reagan (CVN 76), June 21, 2004 - USS Ronald Reagan (CVN 76) sails through the Straits of Magellan on its way to the Pacific Ocean. The Navyís newest aircraft carrier is underway circumnavigating South America in transit to its new homeport of San Diego. U.S. Navy photo by Photographerís Mate 3rd Class (AW) Elizabeth Thompson. (RELEASE)

@ -9,7 +9,7 @@ class CrashAfterLightzoneEdit(metaclass=system_tests.CaseMeta):
filename = "$data_path/exiv2-bug479.jpg" filename = "$data_path/exiv2-bug479.jpg"
commands = ["$exiv2 -u -pt $filename"] commands = ["$exiv2 -u -b -pt $filename"]
stdout = ["""Exif.Image.ImageWidth Short 1 3173 stdout = ["""Exif.Image.ImageWidth Short 1 3173
Exif.Image.ImageLength Short 1 2011 Exif.Image.ImageLength Short 1 2011
@ -33,7 +33,7 @@ Exif.Image.ExposureBiasValue SRational 1 0 EV
Exif.Image.MeteringMode Short 1 Multi-segment Exif.Image.MeteringMode Short 1 Multi-segment
Exif.Image.Flash Short 1 No, compulsory Exif.Image.Flash Short 1 No, compulsory
Exif.Image.FocalLength Rational 1 24.0 mm Exif.Image.FocalLength Rational 1 24.0 mm
Exif.Image.0x9286 Undefined 264 (Binary value suppressed) Exif.Image.0x9286 Undefined 264 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 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 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 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 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 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
"""] """]
stderr = ["""Error: Directory Image: Next pointer is out of bounds; ignored. stderr = ["""Error: Directory Image: Next pointer is out of bounds; ignored.
"""] """]

@ -11,7 +11,7 @@ class TypeSizeForExifOnly(metaclass=system_tests.CaseMeta):
filename = "$data_path/exiv2-bug528_copy.jpg" filename = "$data_path/exiv2-bug528_copy.jpg"
commands = [ commands = [
"$exiv2 -u -pt $filename", "$exiv2 -u -b -pt $filename",
"""$exiv2 -u -v -M"set Exif.Image.Software GI" $filename""" """$exiv2 -u -v -M"set Exif.Image.Software GI" $filename"""
] ]
@ -49,8 +49,7 @@ Exif.Photo.MakerNote Undefined 18 0 1 2 0 3 0 0 0 0 0
Exif.MakerNote.Offset Long 1 796 Exif.MakerNote.Offset Long 1 796
Exif.MakerNote.ByteOrder Ascii 3 MM Exif.MakerNote.ByteOrder Ascii 3 MM
Exif.Canon.0x0200 0x0300 0 Exif.Canon.0x0200 0x0300 0
Exif.Photo.UserComment Undefined 37 Chateaux de la Loire Exif.Photo.UserComment Undefined 37 charset=Ascii binary comment
Chambord
Exif.Photo.SubSecTime Ascii 3 81 Exif.Photo.SubSecTime Ascii 3 81
Exif.Photo.SubSecTimeOriginal Ascii 3 81 Exif.Photo.SubSecTimeOriginal Ascii 3 81
Exif.Photo.SubSecTimeDigitized Ascii 3 81 Exif.Photo.SubSecTimeDigitized Ascii 3 81

@ -7,16 +7,13 @@ URL = "http://dev.exiv2.org/issues/711"
COMMANDS = [ COMMANDS = [
"""$exiv2 -u -v -M"set Exif.Image.ProcessingSoftware Initial values, read from the command line" -M"set Exif.Image.DocumentName Float 0.12345" -M"set Exif.Image.ImageDescription Double 0.987654321" $filename""", """$exiv2 -u -v -M"set Exif.Image.ProcessingSoftware Initial values, read from the command line" -M"set Exif.Image.DocumentName Float 0.12345" -M"set Exif.Image.ImageDescription Double 0.987654321" $filename""",
"$exiv2 -u -v -b -PEkyct $filename",
"$exiv2 -u -v -PEkyct $filename",
"""$exiv2 -u -v -M"set Exif.Image.ProcessingSoftware Non-intrusive update" $filename""", """$exiv2 -u -v -M"set Exif.Image.ProcessingSoftware Non-intrusive update" $filename""",
"$exiv2 -u -v -PEkyct $filename", "$exiv2 -u -v -b -PEkyct $filename",
"""$exiv2 -u -v -M"set Exif.Image.ProcessingSoftware Intrusive update, writing the structure from scratch" $filename""", """$exiv2 -u -v -M"set Exif.Image.ProcessingSoftware Intrusive update, writing the structure from scratch" $filename""",
"$exiv2 -u -v -PEkyct $filename", "$exiv2 -u -v -b -PEkyct $filename",
] ]
@system_tests.CopyFiles("$data_path/exiv2-empty.jpg") @system_tests.CopyFiles("$data_path/exiv2-empty.jpg")
class LittleEndianORFFilesFromE_PL1Corrupted(metaclass=system_tests.CaseMeta): class LittleEndianORFFilesFromE_PL1Corrupted(metaclass=system_tests.CaseMeta):

@ -12,7 +12,7 @@ FORMATS = ["jpg", "psd"]
def make_commands(filename): def make_commands(filename):
return [ return [
"""$exiv2 -u -v -M"set Exif.Photo.UserComment Test" """ + filename, """$exiv2 -u -v -M"set Exif.Photo.UserComment Test" """ + filename,
"$exiv2 -u -pt " + filename "$exiv2 -u -pt -b " + filename
] ]
@ -49,7 +49,7 @@ Exif.Photo.MaxApertureValue Rational 1 F2.8
Exif.Photo.MeteringMode Short 1 Multi-segment Exif.Photo.MeteringMode Short 1 Multi-segment
Exif.Photo.Flash Short 1 No, auto Exif.Photo.Flash Short 1 No, auto
Exif.Photo.FocalLength Rational 1 7.4 mm Exif.Photo.FocalLength Rational 1 7.4 mm
Exif.Photo.MakerNote Undefined 590 (Binary value suppressed) Exif.Photo.MakerNote Undefined 590 14 0 1 0 3 0 46 0 0 0 92 4 0 0 2 0 3 0 4 0 0 0 184 4 0 0 3 0 3 0 4 0 0 0 192 4 0 0 4 0 3 0 34 0 0 0 200 4 0 0 0 0 3 0 6 0 0 0 12 5 0 0 0 0 3 0 4 0 0 0 24 5 0 0 18 0 3 0 28 0 0 0 32 5 0 0 19 0 3 0 4 0 0 0 88 5 0 0 6 0 2 0 32 0 0 0 96 5 0 0 7 0 2 0 24 0 0 0 128 5 0 0 8 0 4 0 1 0 0 0 104 167 20 0 9 0 2 0 32 0 0 0 152 5 0 0 16 0 4 0 1 0 0 0 0 0 39 1 13 0 3 0 34 0 0 0 184 5 0 0 0 0 0 0 92 0 2 0 0 0 5 0 1 0 0 0 0 0 4 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 15 0 3 0 1 0 1 64 0 0 255 255 255 255 199 2 237 0 32 0 98 0 180 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 0 0 224 8 224 8 0 0 1 0 0 0 0 0 255 127 0 0 0 0 0 0 2 0 237 0 30 1 215 0 0 4 0 0 0 0 0 0 68 0 0 0 128 0 50 1 181 0 245 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 1 0 121 0 0 0 180 0 247 0 0 0 0 0 0 0 250 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 9 0 9 0 224 8 168 6 224 8 212 0 153 1 38 0 102 254 0 0 154 1 102 254 0 0 154 1 102 254 0 0 154 1 215 255 215 255 215 255 0 0 0 0 0 0 41 0 41 0 41 0 16 0 4 0 0 0 0 0 0 0 0 0 73 77 71 58 80 111 119 101 114 83 104 111 116 32 83 52 48 48 32 74 80 69 71 0 0 0 0 0 0 0 0 0 70 105 114 109 119 97 114 101 32 86 101 114 115 105 111 110 32 50 46 48 48 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 68 0 9 0 67 1 57 1 62 1 65 1 69 1 68 1 67 1 66 1 70 1 64 0 0 0 0 0 83 0 0 0 0 0 10 0 0 0 10 0 3 0 120 0 123 1 26 0 249 255 249 3 10 4 0 0 0 0 0 0 0 0 153 0 0 0 0 0
Exif.Photo.UserComment Undefined 12 Test Exif.Photo.UserComment Undefined 12 Test
Exif.Photo.FlashpixVersion Undefined 4 1.00 Exif.Photo.FlashpixVersion Undefined 4 1.00
Exif.Photo.PixelXDimension Short 1 2272 Exif.Photo.PixelXDimension Short 1 2272

@ -13,7 +13,7 @@ class DetectionOfSigma55_200mmLens(metaclass=system_tests.CaseMeta):
] ]
commands = [ commands = [
"$exiv2 -pa --grep Lens " + filename for filename in filenames "$exiv2 -pa -b --grep Lens " + filename for filename in filenames
] ]
stdout = [ stdout = [
"""Exif.Pentax.LensType Byte 2 Sigma 55-200mm F4-5.6 DC """Exif.Pentax.LensType Byte 2 Sigma 55-200mm F4-5.6 DC

@ -9,7 +9,7 @@ class DontSegfaultWhenAccessingFocalLength(metaclass=CaseMeta):
filename = path("$data_path/exiv2-bug855.jpg") filename = path("$data_path/exiv2-bug855.jpg")
commands = ["$exiv2 -pa $filename"] commands = ["$exiv2 -pa -b $filename"]
stdout = ["""Exif.Image.NewSubfileType Long 1 Thumbnail/Preview image stdout = ["""Exif.Image.NewSubfileType Long 1 Thumbnail/Preview image
Exif.Image.Make Ascii 20 PENTAX Exif.Image.Make Ascii 20 PENTAX

@ -11,8 +11,8 @@ class DarwinCoreXmpMetadataPrint(metaclass=CaseMeta):
filename = path("$data_path/exiv2-bug937.jpg") filename = path("$data_path/exiv2-bug937.jpg")
commands = [ commands = [
"$exiv2 -q -pa -g dwc $filename", "$exiv2 -q -pa -b -g dwc $filename",
"$exiv2 -q -PXkyctl -g Date $filename", "$exiv2 -q -PXkyctl -b -g Date $filename",
] ]
stdout = [ stdout = [

Loading…
Cancel
Save