Merge pull request #1513 from Exiv2/fix_1508_enableBMFF

Fix 1508 enable bmff
main
Robin Mills 4 years ago committed by GitHub
commit 49cfe45323
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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)
<div id="3">
## 3 License and Support
@ -1252,5 +1252,5 @@ $ sudo pkg install developer/gcc-7
[TOC](#TOC)
Written by Robin Mills<br>robin@clanmills.com<br>Updated: 2021-03-18
Written by Robin Mills<br>robin@clanmills.com<br>Updated: 2021-04-02

@ -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

@ -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 <exiv2/exiv2.hpp>
#include <iostream>
#include <iomanip>
#include <cassert>
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;

@ -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 <exiv2/exiv2.hpp>
#ifdef EXV_USE_CURL
#include <curl/curl.h>
#endif
#include <iostream>
#include <cstdlib>
@ -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;

@ -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 <exiv2/exiv2.hpp>
#include <iostream>
#include <iomanip>
#include <cassert>
@ -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";

@ -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 <exiv2/exiv2.hpp>
#include <iostream>
#include <iomanip>
#include <cassert>
@ -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";

@ -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 <exiv2/exiv2.hpp>
#include <iostream>
#include <cassert>
@ -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";

@ -1,16 +1,24 @@
// ***************************************************************** -*- C++ -*-
/*
Abstract : ExifData assignment and copy construction unit tests
File : exifdata-test.cpp
Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
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 <exiv2/exiv2.hpp>
#include <exiv2/exiv2.hpp>
#include <iostream>
#include <iomanip>
#include <string>
@ -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";

@ -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 <exiv2/exiv2.hpp>
#include <iostream>
#include <iomanip>
#include <cassert>
@ -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;

@ -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 <exiv2/exiv2.hpp>
#include <iostream>
#include <iomanip>
#include <cassert>
@ -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];

@ -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 <exiv2/exiv2.hpp>
#include <iostream>
#include <iomanip>
#include <cassert>
@ -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";

@ -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 <map>
#include <vector>
#include <set>
#include <cstdlib>
#include <limits.h>
#include <sys/types.h>
@ -270,6 +287,9 @@ int main(int argc, char* const argv[])
{
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
#ifdef EXIV2_ENABLE_BMFF
Exiv2::enableBMFF();
#endif
try {
if (argc < 2 || argc > 3) {

@ -1,9 +1,4 @@
// ***************************************************************** -*- C++ -*-
// geotag.cpp
// Sample program to read gpx files and update images with GPS tags
// g++ geotag.cpp -o geotag -lexiv2 -lexpat
/*
* Copyright (C) 2004-2021 Exiv2 authors
* This program is part of the Exiv2 distribution.
@ -22,6 +17,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
*/
// geotag.cpp
// Sample program to read gpx files and update images with GPS tags
// g++ geotag.cpp -o geotag -lexiv2 -lexpat
#include <exiv2/exiv2.hpp>
#include "unused.h"
@ -785,6 +783,9 @@ int main(int argc,const char* argv[])
{
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
#ifdef EXIV2_ENABLE_BMFF
Exiv2::enableBMFF();
#endif
int result=0;
const char* program = argv[0];

@ -103,6 +103,9 @@ int main(int argc, char** const argv)
{
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
#ifdef EXIV2_ENABLE_BMFF
Exiv2::enableBMFF();
#endif
int n;

@ -23,7 +23,6 @@
*/
#include <exiv2/exiv2.hpp>
#include <iostream>
#include <stdlib.h>
@ -40,6 +39,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] << " [key value]+" << std::endl;

@ -18,7 +18,6 @@
* Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
*/
/*
670 rmills@rmillsmbp:~/gnu/exiv2/trunk/samples $ gcc ../src/ini.cpp ini-test.cpp -lstdc++ -o ini-test
671 rmills@rmillsmbp:~/gnu/exiv2/trunk/samples $ ./ini-test
@ -27,17 +26,17 @@ Config loaded from : 'initest.ini' version=6, name=Bob Smith, email=bob@smith.co
672 rmills@rmillsmbp:~/gnu/exiv2/trunk/samples $
*/
// Example that shows simple usage of the INIReader class
#include <exiv2/exiv2.hpp>
#include <iostream>
int main()
{
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
#ifdef EXIV2_ENABLE_BMFF
Exiv2::enableBMFF();
#endif
int result = 0 ;
const char* ini = "ini-test.ini";

@ -20,7 +20,6 @@
// *****************************************************************************
// included header files
#include <exiv2/exiv2.hpp>
#include <cstdio> // for EOF
#include <cstring>
#include <iostream>
@ -42,6 +41,9 @@ int main(int argc, char* const argv[])
{
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
#ifdef EXIV2_ENABLE_BMFF
Exiv2::enableBMFF();
#endif
try {
if (argc < 4 || argc > 6 ) {

@ -21,7 +21,6 @@
*/
#include <exiv2/exiv2.hpp>
#include <iostream>
#include <iomanip>
#include <cassert>
@ -30,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";

@ -1,6 +1,4 @@
// ***************************************************************** -*- C++ -*-
// iptcprint.cpp
// Sample program to print the IPTC metadata of an image
/*
* Copyright (C) 2004-2021 Exiv2 authors
* This program is part of the Exiv2 distribution.
@ -19,18 +17,21 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
*/
// iptcprint.cpp
// Sample program to print the IPTC metadata of an image
#include <exiv2/exiv2.hpp>
#include <iostream>
#include <iomanip>
#include <cassert>
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";

@ -17,10 +17,8 @@
* 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 <exiv2/exiv2.hpp>
#include <exiv2/exiv2.hpp>
#include <iostream>
#include <iomanip>
#include <cassert>
@ -38,6 +36,9 @@ int main(int argc, char* const argv[])
{
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
#ifdef EXIV2_ENABLE_BMFF
Exiv2::enableBMFF();
#endif
try {

@ -17,10 +17,8 @@
* 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 <exiv2/exiv2.hpp>
#include <exiv2/exiv2.hpp>
#include <iostream>
#include <string>
#include <cstring>
@ -31,6 +29,9 @@ int main()
{
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
#ifdef EXIV2_ENABLE_BMFF
Exiv2::enableBMFF();
#endif
int tc = 0;
int rc = 0;

@ -21,7 +21,6 @@
*/
#include <exiv2/exiv2.hpp>
#include <cassert>
#include <iostream>
@ -30,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 != 3) {
std::cout << "Usage: " << argv[0] << " image datafile\n";

@ -17,10 +17,7 @@
* 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 <exiv2/exiv2.hpp>
#include <iostream>
#include <fstream>
#include <cassert>
@ -36,6 +33,9 @@ int main(int argc, char* const argv[])
try {
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
#ifdef EXIV2_ENABLE_BMFF
Exiv2::enableBMFF();
#endif
// Handle command line arguments
Params params;

@ -21,7 +21,6 @@
*/
#include <exiv2/exiv2.hpp>
#include <iostream>
#include <cstring>
@ -31,6 +30,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";

@ -20,10 +20,7 @@
* Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
*/
#include "error.hpp"
#include "exif.hpp"
#include "image.hpp"
#include <exiv2/exiv2.hpp>
#include <cassert>
#include <iostream>
@ -31,6 +28,9 @@ int main(int argc, char* const argv[])
{
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
#ifdef EXIV2_ENABLE_BMFF
Exiv2::enableBMFF();
#endif
try {
if (argc != 2) {

@ -82,6 +82,9 @@ int main(int argc,const char* argv[])
{
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
#ifdef EXIV2_ENABLE_BMFF
Exiv2::enableBMFF();
#endif
int result = 0;

@ -20,7 +20,6 @@
*/
#include <exiv2/exiv2.hpp>
#include <iostream>
#include <fstream>
#include <sstream>
@ -32,6 +31,9 @@ int main(int argc, char* const argv[])
{
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
#ifdef EXIV2_ENABLE_BMFF
Exiv2::enableBMFF();
#endif
if (argc != 2) {
std::cout << "Usage: " << argv[0] << " file\n";

@ -21,7 +21,6 @@
*/
#include <exiv2/exiv2.hpp>
#include <string>
#include <iostream>
#include <cassert>
@ -30,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";

@ -23,7 +23,6 @@
*/
#include <exiv2/exiv2.hpp>
#include <iostream>
#include <iomanip>
#include <cassert>
@ -32,6 +31,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 {--nocurl | --curl}\n\n";

@ -21,7 +21,6 @@
*/
#include <exiv2/exiv2.hpp>
#include <iostream>
#include <iomanip>
@ -60,6 +59,9 @@ int main()
{
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
#ifdef EXIV2_ENABLE_BMFF
Exiv2::enableBMFF();
#endif
std::cout << std::setfill(' ');

@ -19,7 +19,6 @@
*/
#include <exiv2/exiv2.hpp>
#include <iostream>
#include <string>
#include <sstream>
@ -30,6 +29,9 @@ int main(int argc, char* argv[])
{
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
#ifdef EXIV2_ENABLE_BMFF
Exiv2::enableBMFF();
#endif
int rc = EXIT_SUCCESS;
std::ostringstream out;

@ -40,6 +40,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";

@ -20,9 +20,7 @@
// tiffaddpath-test.cpp
// Test driver to test adding new tags to a TIFF composite structure
#include <exiv2/exiv2.hpp>
#include "tiffcomposite_int.hpp"
#include "makernote2_int.hpp"
#include "tiffimage_int.hpp"
@ -84,6 +82,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::cout << "Usage: " << argv[0] << " tag group\n"

@ -18,14 +18,11 @@
* 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 <exiv2/exiv2.hpp>
#include <exiv2/exiv2.hpp>
#include <iostream>
#include <fstream>
#include <cassert>
#include "utils.hpp"
#include "toexv.hpp"
@ -44,6 +41,9 @@ int main(int argc, char* const argv[])
{
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
#ifdef EXIV2_ENABLE_BMFF
Exiv2::enableBMFF();
#endif
try {
// Handle command line arguments

@ -23,13 +23,15 @@
// Simple tests for the wide-string error class WError
#include <exiv2/exiv2.hpp>
#include <iostream>
int main()
{
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
#ifdef EXIV2_ENABLE_BMFF
Exiv2::enableBMFF();
#endif
try {
throw Exiv2::Error(Exiv2::kerGeneralError, "ARG1", "ARG2", "ARG3");

@ -17,10 +17,8 @@
* 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 <exiv2/exiv2.hpp>
#include <exiv2/exiv2.hpp>
#include <iostream>
#include <sstream>
#include <iomanip>
@ -46,6 +44,9 @@ int main(int argc, char* const argv[])
{
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
#ifdef EXIV2_ENABLE_BMFF
Exiv2::enableBMFF();
#endif
try {

@ -17,10 +17,8 @@
* 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 <exiv2/exiv2.hpp>
#include <exiv2/exiv2.hpp>
#include <iostream>
#include <iomanip>
#include <string>
@ -35,6 +33,9 @@ int main(int argc, char* const argv[])
{
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
#ifdef EXIV2_ENABLE_BMFF
Exiv2::enableBMFF();
#endif
try {
if (argc != 2) {

@ -21,7 +21,6 @@
// xmpdump.cpp
// Sample program to dump the XMP packet of an image
#include <exiv2/exiv2.hpp>
#include <cassert>
#include <iostream>
#include <string>
@ -30,6 +29,9 @@ int main(int argc, char* const argv[])
{
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
#ifdef EXIV2_ENABLE_BMFF
Exiv2::enableBMFF();
#endif
try {
if (argc != 2) {

@ -21,7 +21,6 @@
// Read an XMP packet from a file, parse it and print all (known) properties.
#include <exiv2/exiv2.hpp>
#include <string>
#include <iostream>
#include <iomanip>
@ -30,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";

@ -21,7 +21,6 @@
// Read an XMP packet from a file, parse and re-serialize it.
#include <exiv2/exiv2.hpp>
#include <string>
#include <iostream>
#include <iomanip>
@ -30,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";

@ -27,7 +27,6 @@
// ========================================================================
#include <exiv2/exiv2.hpp>
#include <string>
#include <iostream>
#include <iomanip>
@ -37,6 +36,9 @@ int main(int argc, char** argv)
{
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
#ifdef EXIV2_ENABLE_BMFF
Exiv2::enableBMFF();
#endif
try
{

@ -39,6 +39,9 @@ int main()
try {
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
#ifdef EXIV2_ENABLE_BMFF
Exiv2::enableBMFF();
#endif
// The XMP property container
Exiv2::XmpData xmpData;

@ -85,16 +85,14 @@ namespace Exiv2
{
static bool enabled = false;
#ifdef EXV_ENABLE_BMFF
EXIV2API bool enableBMFF(bool enable)
{
#ifdef EXV_ENABLE_BMFF
enabled = enable;
return true;
#else
UNUSED(enable);
return false;
#endif // EXV_ENABLE_BMFF
bool result = enabled;
enabled = enable ;
return result ;
}
#endif // EXV_ENABLE_BMFF
std::string Iloc::toString() const
{

@ -17,15 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
*/
/*
Abstract: Command line program to display and manipulate image metadata.
File: exiv2.cpp
Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
History: 10-Dec-03, ahu: created
*/
// *****************************************************************************
// included header files
#include <exiv2/exiv2.hpp>
// include local header files which are not part of libexiv2
@ -128,6 +120,9 @@ int main(int argc, char* const argv[])
{
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
#ifdef EXV_ENABLE_BMFF
Exiv2::enableBMFF();
#endif
#ifdef EXV_ENABLE_NLS
setlocale(LC_ALL, "");
@ -136,10 +131,6 @@ int main(int argc, char* const argv[])
textdomain(EXV_PACKAGE_NAME);
#endif
#ifdef EXV_ENABLE_BMFF
Exiv2::enableBMFF();
#endif
// Handle command line arguments
Params& params = Params::instance();
if (params.getopt(argc, argv)) {

Loading…
Cancel
Save