diff --git a/README.md b/README.md
index e8242ef7..7b22b432 100644
--- a/README.md
+++ b/README.md
@@ -587,7 +587,7 @@ int main(int argc, const char* argv[])
{
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
-#if EXIV2_TEST_VERSION(0,27,4)
+#if EXIV2_ENABLE_BMFF
Exiv2::enableBMFF(true);
#endif
...
@@ -608,7 +608,9 @@ The exiv2 command-line program and sample applications call the following at the
```cpp
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
+#if EXIV2_ENABLE_BMFF
Exiv2::enableBMFF(true);
+#endif
```
[TOC](#TOC)
@@ -782,12 +784,10 @@ Access to the bmff code is guarded in two ways. Firstly, you have to build the
EXIV2API bool enableBMFF(bool enable);
```
-The return value from `enableBMFF()` reports the build status of bmff support. A return value of true indicates that the library has been built with bmff support.
+The return value from `enableBMFF()` reports the current status of bmff support before calling this function.
Applications may wish to provide a preference setting to enable bmff support and thereby place the responsibility for the use of this code with the user of the application.
-It is recommended that you enclose the call to `enableBMFF()` with the compile time macro EXIV2\_TEST\_VERSION to ensure that your code builds cleanly on earlier versions of Exiv2. It is recommended that you call enableBMFF() at process start-up as it is not threadsafe. A code snippet is provided in [2.14 Thread Safety](#2-14).
-
[TOC](#TOC)
## 3 License and Support
@@ -1252,5 +1252,5 @@ $ sudo pkg install developer/gcc-7
[TOC](#TOC)
-Written by Robin Mills
robin@clanmills.com
Updated: 2021-03-18
+Written by Robin Mills
robin@clanmills.com
Updated: 2021-04-02
diff --git a/samples/Jzon.cpp b/samples/Jzon.cpp
index 6f52a106..3d0f3a29 100644
--- a/samples/Jzon.cpp
+++ b/samples/Jzon.cpp
@@ -1,23 +1,4 @@
// ***************************************************************** -*- C++ -*-
-/*
- * Copyright (C) 2004-2021 Exiv2 authors
- * This program is part of the Exiv2 distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
- */
-
/*
Copyright (c) 2013 Johannes Häggqvist
diff --git a/samples/addmoddel.cpp b/samples/addmoddel.cpp
index e171eddb..8186e769 100644
--- a/samples/addmoddel.cpp
+++ b/samples/addmoddel.cpp
@@ -1,15 +1,38 @@
// ***************************************************************** -*- C++ -*-
+/*
+ * Copyright (C) 2004-2021 Exiv2 authors
+ * This program is part of the Exiv2 distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
+ */
// addmoddel.cpp
// Sample program showing how to add, modify and delete Exif metadata.
#include
-
#include
#include
#include
int main(int argc, char* const argv[])
try {
+ Exiv2::XmpParser::initialize();
+ ::atexit(Exiv2::XmpParser::terminate);
+#ifdef EXIV2_ENABLE_BMFF
+ Exiv2::enableBMFF();
+#endif
+
if (argc != 2) {
std::cout << "Usage: " << argv[0] << " file\n";
return 1;
diff --git a/samples/conntest.cpp b/samples/conntest.cpp
index f67b5c1c..a0c99f5b 100644
--- a/samples/conntest.cpp
+++ b/samples/conntest.cpp
@@ -1,13 +1,29 @@
// ***************************************************************** -*- C++ -*-
+/*
+ * Copyright (C) 2004-2021 Exiv2 authors
+ * This program is part of the Exiv2 distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
+ */
// con-test.cpp
// Tester application for testing the http/https/ftp/ssh/sftp connection
#include
-
#ifdef EXV_USE_CURL
#include
#endif
-
#include
#include
@@ -116,6 +132,9 @@ int main(int argc,const char** argv)
{
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
+#ifdef EXIV2_ENABLE_BMFF
+ Exiv2::enableBMFF();
+#endif
if (argc < 2) {
std::cout << "Usage: " << argv[0] << " url {-http1_0}" << std::endl;
diff --git a/samples/convert-test.cpp b/samples/convert-test.cpp
index 30b05cba..4bde64a1 100644
--- a/samples/convert-test.cpp
+++ b/samples/convert-test.cpp
@@ -1,9 +1,26 @@
// ***************************************************************** -*- C++ -*-
+/*
+ * Copyright (C) 2004-2021 Exiv2 authors
+ * This program is part of the Exiv2 distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
+ */
// convert-test.cpp
// Conversion test driver - make sure you have a copy of the input file around!
#include
-
#include
#include
#include
@@ -12,6 +29,9 @@ int main(int argc, char* const argv[])
try {
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
+#ifdef EXIV2_ENABLE_BMFF
+ Exiv2::enableBMFF();
+#endif
if (argc != 2) {
std::cout << "Usage: " << argv[0] << " file\n";
diff --git a/samples/easyaccess-test.cpp b/samples/easyaccess-test.cpp
index ef505936..96195397 100644
--- a/samples/easyaccess-test.cpp
+++ b/samples/easyaccess-test.cpp
@@ -1,10 +1,26 @@
// ***************************************************************** -*- C++ -*-
+/*
+ * Copyright (C) 2004-2021 Exiv2 authors
+ * This program is part of the Exiv2 distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
+ */
// easyaccess-test.cpp
// Sample program using high-level metadata access functions
-// included header files
#include
-
#include
#include
#include
@@ -57,6 +73,9 @@ int main(int argc, char **argv)
try {
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
+#ifdef EXIV2_ENABLE_BMFF
+ Exiv2::enableBMFF();
+#endif
if (argc != 2) {
std::cout << "Usage: " << argv[0] << " file\n";
diff --git a/samples/exifcomment.cpp b/samples/exifcomment.cpp
index 08724a46..bfaa7838 100644
--- a/samples/exifcomment.cpp
+++ b/samples/exifcomment.cpp
@@ -1,12 +1,27 @@
// ***************************************************************** -*- C++ -*-
+/*
+ * Copyright (C) 2004-2021 Exiv2 authors
+ * This program is part of the Exiv2 distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
+ */
/*
Abstract : Sample program showing how to set the Exif comment of an image,
Exif.Photo.UserComment
-
- File: exifcomment.cpp
*/
-// *****************************************************************************
-// included header files
+
#include
#include
#include
@@ -17,6 +32,9 @@ int main(int argc, char* const argv[])
try {
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
+#ifdef EXIV2_ENABLE_BMFF
+ Exiv2::enableBMFF();
+#endif
if (argc != 2) {
std::cout << "Usage: " << argv[0] << " file\n";
diff --git a/samples/exifdata-test.cpp b/samples/exifdata-test.cpp
index eed3b9cb..c177c363 100644
--- a/samples/exifdata-test.cpp
+++ b/samples/exifdata-test.cpp
@@ -1,16 +1,24 @@
// ***************************************************************** -*- C++ -*-
/*
- Abstract : ExifData assignment and copy construction unit tests
-
- File : exifdata-test.cpp
- Author(s): Andreas Huggel (ahu)
- History : 20-Feb-05, ahu: created
-
+ * Copyright (C) 2004-2021 Exiv2 authors
+ * This program is part of the Exiv2 distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
*/
-// *****************************************************************************
-// included header files
-#include
+#include
#include
#include
#include
@@ -26,6 +34,9 @@ int main(int argc, char* const argv[])
try {
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
+#ifdef EXIV2_ENABLE_BMFF
+ Exiv2::enableBMFF();
+#endif
if (argc != 2) {
std::cout << "Usage: " << argv[0] << " file\n";
diff --git a/samples/exifdata.cpp b/samples/exifdata.cpp
index fb038679..b737da6c 100644
--- a/samples/exifdata.cpp
+++ b/samples/exifdata.cpp
@@ -1,9 +1,26 @@
// ***************************************************************** -*- C++ -*-
+/*
+ * Copyright (C) 2004-2021 Exiv2 authors
+ * This program is part of the Exiv2 distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
+ */
// exifdata.cpp
// Sample program to format exif data in various external formats
#include
-
#include
#include
#include
@@ -154,6 +171,9 @@ int main(int argc,const char* argv[])
{
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
+#ifdef EXIV2_ENABLE_BMFF
+ Exiv2::enableBMFF();
+#endif
format_t formats;
formats["wolf"] = wolf;
diff --git a/samples/exifprint.cpp b/samples/exifprint.cpp
index 19c521d9..d6849507 100644
--- a/samples/exifprint.cpp
+++ b/samples/exifprint.cpp
@@ -1,9 +1,24 @@
// ***************************************************************** -*- C++ -*-
-// exifprint.cpp
-// Sample program to print the Exif metadata of an image
+/*
+ * Copyright (C) 2004-2021 Exiv2 authors
+ * This program is part of the Exiv2 distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
+ */
#include
-
#include
#include
#include
@@ -31,6 +46,9 @@ int _tmain(int argc, _tchar* const argv[])
try {
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
+#ifdef EXIV2_ENABLE_BMFF
+ Exiv2::enableBMFF();
+#endif
const _tchar* prog = argv[0];
const _tchar* file = argv[1];
diff --git a/samples/exifvalue.cpp b/samples/exifvalue.cpp
index 000cbb4a..c43c2e84 100644
--- a/samples/exifvalue.cpp
+++ b/samples/exifvalue.cpp
@@ -1,9 +1,26 @@
// ***************************************************************** -*- C++ -*-
+/*
+ * Copyright (C) 2004-2021 Exiv2 authors
+ * This program is part of the Exiv2 distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
+ */
// exifvalue.cpp
// Sample program to print value of an exif key in an image
#include
-
#include
#include
#include
@@ -13,6 +30,9 @@ int main(int argc, char* const argv[])
{
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
+#ifdef EXIV2_ENABLE_BMFF
+ Exiv2::enableBMFF();
+#endif
if (argc != 3) {
std::cerr << "Usage: " << argv[0] << " file key\n";
diff --git a/samples/exiv2json.cpp b/samples/exiv2json.cpp
index 783d8060..3e9752dc 100644
--- a/samples/exiv2json.cpp
+++ b/samples/exiv2json.cpp
@@ -1,4 +1,22 @@
// ***************************************************************** -*- C++ -*-
+/*
+ * Copyright (C) 2004-2021 Exiv2 authors
+ * This program is part of the Exiv2 distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
+ */
// exiv2json.cpp
// Sample program to print metadata in JSON format
@@ -12,7 +30,6 @@
#include