Use the documented 5 line prolog in every sample application. Tidy up sample prologs and header code.
This commit is contained in:
parent
e3a59b47b4
commit
9da2aed5d2
@ -1,23 +1,4 @@
|
|||||||
// ***************************************************************** -*- C++ -*-
|
// ***************************************************************** -*- 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
|
Copyright (c) 2013 Johannes Häggqvist
|
||||||
|
|
||||||
|
|||||||
@ -1,15 +1,38 @@
|
|||||||
// ***************************************************************** -*- C++ -*-
|
// ***************************************************************** -*- 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
|
// addmoddel.cpp
|
||||||
// Sample program showing how to add, modify and delete Exif metadata.
|
// Sample program showing how to add, modify and delete Exif metadata.
|
||||||
|
|
||||||
#include <exiv2/exiv2.hpp>
|
#include <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
int main(int argc, char* const argv[])
|
int main(int argc, char* const argv[])
|
||||||
try {
|
try {
|
||||||
|
Exiv2::XmpParser::initialize();
|
||||||
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
std::cout << "Usage: " << argv[0] << " file\n";
|
std::cout << "Usage: " << argv[0] << " file\n";
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@ -1,13 +1,29 @@
|
|||||||
// ***************************************************************** -*- C++ -*-
|
// ***************************************************************** -*- 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
|
// con-test.cpp
|
||||||
// Tester application for testing the http/https/ftp/ssh/sftp connection
|
// Tester application for testing the http/https/ftp/ssh/sftp connection
|
||||||
|
|
||||||
#include <exiv2/exiv2.hpp>
|
#include <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
#ifdef EXV_USE_CURL
|
#ifdef EXV_USE_CURL
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
@ -116,6 +132,9 @@ int main(int argc,const char** argv)
|
|||||||
{
|
{
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
std::cout << "Usage: " << argv[0] << " url {-http1_0}" << std::endl;
|
std::cout << "Usage: " << argv[0] << " url {-http1_0}" << std::endl;
|
||||||
|
|||||||
@ -1,9 +1,26 @@
|
|||||||
// ***************************************************************** -*- C++ -*-
|
// ***************************************************************** -*- 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
|
// convert-test.cpp
|
||||||
// Conversion test driver - make sure you have a copy of the input file around!
|
// Conversion test driver - make sure you have a copy of the input file around!
|
||||||
|
|
||||||
#include <exiv2/exiv2.hpp>
|
#include <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
@ -12,6 +29,9 @@ int main(int argc, char* const argv[])
|
|||||||
try {
|
try {
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
std::cout << "Usage: " << argv[0] << " file\n";
|
std::cout << "Usage: " << argv[0] << " file\n";
|
||||||
|
|||||||
@ -1,10 +1,26 @@
|
|||||||
// ***************************************************************** -*- C++ -*-
|
// ***************************************************************** -*- 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
|
// easyaccess-test.cpp
|
||||||
// Sample program using high-level metadata access functions
|
// Sample program using high-level metadata access functions
|
||||||
|
|
||||||
// included header files
|
|
||||||
#include <exiv2/exiv2.hpp>
|
#include <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
@ -57,6 +73,9 @@ int main(int argc, char **argv)
|
|||||||
try {
|
try {
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
std::cout << "Usage: " << argv[0] << " file\n";
|
std::cout << "Usage: " << argv[0] << " file\n";
|
||||||
|
|||||||
@ -1,12 +1,27 @@
|
|||||||
// ***************************************************************** -*- C++ -*-
|
// ***************************************************************** -*- 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,
|
Abstract : Sample program showing how to set the Exif comment of an image,
|
||||||
Exif.Photo.UserComment
|
Exif.Photo.UserComment
|
||||||
|
|
||||||
File: exifcomment.cpp
|
|
||||||
*/
|
*/
|
||||||
// *****************************************************************************
|
|
||||||
// included header files
|
|
||||||
#include <exiv2/exiv2.hpp>
|
#include <exiv2/exiv2.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
@ -17,6 +32,9 @@ int main(int argc, char* const argv[])
|
|||||||
try {
|
try {
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
std::cout << "Usage: " << argv[0] << " file\n";
|
std::cout << "Usage: " << argv[0] << " file\n";
|
||||||
|
|||||||
@ -1,16 +1,24 @@
|
|||||||
// ***************************************************************** -*- C++ -*-
|
// ***************************************************************** -*- C++ -*-
|
||||||
/*
|
/*
|
||||||
Abstract : ExifData assignment and copy construction unit tests
|
* Copyright (C) 2004-2021 Exiv2 authors
|
||||||
|
* This program is part of the Exiv2 distribution.
|
||||||
File : exifdata-test.cpp
|
*
|
||||||
Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
|
* This program is free software; you can redistribute it and/or
|
||||||
History : 20-Feb-05, ahu: created
|
* 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 <iostream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -26,6 +34,9 @@ int main(int argc, char* const argv[])
|
|||||||
try {
|
try {
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
std::cout << "Usage: " << argv[0] << " file\n";
|
std::cout << "Usage: " << argv[0] << " file\n";
|
||||||
|
|||||||
@ -1,9 +1,26 @@
|
|||||||
// ***************************************************************** -*- C++ -*-
|
// ***************************************************************** -*- 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
|
// exifdata.cpp
|
||||||
// Sample program to format exif data in various external formats
|
// Sample program to format exif data in various external formats
|
||||||
|
|
||||||
#include <exiv2/exiv2.hpp>
|
#include <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
@ -154,6 +171,9 @@ int main(int argc,const char* argv[])
|
|||||||
{
|
{
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
format_t formats;
|
format_t formats;
|
||||||
formats["wolf"] = wolf;
|
formats["wolf"] = wolf;
|
||||||
|
|||||||
@ -1,9 +1,24 @@
|
|||||||
// ***************************************************************** -*- C++ -*-
|
// ***************************************************************** -*- 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 <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
@ -31,6 +46,9 @@ int _tmain(int argc, _tchar* const argv[])
|
|||||||
try {
|
try {
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
const _tchar* prog = argv[0];
|
const _tchar* prog = argv[0];
|
||||||
const _tchar* file = argv[1];
|
const _tchar* file = argv[1];
|
||||||
|
|||||||
@ -1,9 +1,26 @@
|
|||||||
// ***************************************************************** -*- C++ -*-
|
// ***************************************************************** -*- 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
|
// exifvalue.cpp
|
||||||
// Sample program to print value of an exif key in an image
|
// Sample program to print value of an exif key in an image
|
||||||
|
|
||||||
#include <exiv2/exiv2.hpp>
|
#include <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
@ -13,6 +30,9 @@ int main(int argc, char* const argv[])
|
|||||||
{
|
{
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (argc != 3) {
|
if (argc != 3) {
|
||||||
std::cerr << "Usage: " << argv[0] << " file key\n";
|
std::cerr << "Usage: " << argv[0] << " file key\n";
|
||||||
|
|||||||
@ -1,4 +1,22 @@
|
|||||||
// ***************************************************************** -*- C++ -*-
|
// ***************************************************************** -*- 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
|
// exiv2json.cpp
|
||||||
// Sample program to print metadata in JSON format
|
// Sample program to print metadata in JSON format
|
||||||
|
|
||||||
@ -12,7 +30,6 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -270,6 +287,9 @@ int main(int argc, char* const argv[])
|
|||||||
{
|
{
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (argc < 2 || argc > 3) {
|
if (argc < 2 || argc > 3) {
|
||||||
|
|||||||
@ -1,9 +1,4 @@
|
|||||||
// ***************************************************************** -*- C++ -*-
|
// ***************************************************************** -*- 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
|
* Copyright (C) 2004-2021 Exiv2 authors
|
||||||
* This program is part of the Exiv2 distribution.
|
* This program is part of the Exiv2 distribution.
|
||||||
@ -22,6 +17,9 @@
|
|||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
|
* 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 <exiv2/exiv2.hpp>
|
||||||
#include "unused.h"
|
#include "unused.h"
|
||||||
@ -785,6 +783,9 @@ int main(int argc,const char* argv[])
|
|||||||
{
|
{
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
int result=0;
|
int result=0;
|
||||||
const char* program = argv[0];
|
const char* program = argv[0];
|
||||||
|
|||||||
@ -103,6 +103,9 @@ int main(int argc, char** const argv)
|
|||||||
{
|
{
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <exiv2/exiv2.hpp>
|
#include <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
@ -40,6 +39,9 @@ int main(int argc,const char** argv)
|
|||||||
{
|
{
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
if ( argc < 2 ) {
|
if ( argc < 2 ) {
|
||||||
std::cout << "usage : " << argv[0] << " [key value]+" << std::endl;
|
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.
|
* 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
|
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
|
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 $
|
672 rmills@rmillsmbp:~/gnu/exiv2/trunk/samples $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
// Example that shows simple usage of the INIReader class
|
// Example that shows simple usage of the INIReader class
|
||||||
|
|
||||||
#include <exiv2/exiv2.hpp>
|
#include <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
int result = 0 ;
|
int result = 0 ;
|
||||||
const char* ini = "ini-test.ini";
|
const char* ini = "ini-test.ini";
|
||||||
|
|||||||
@ -20,7 +20,6 @@
|
|||||||
// *****************************************************************************
|
// *****************************************************************************
|
||||||
// included header files
|
// included header files
|
||||||
#include <exiv2/exiv2.hpp>
|
#include <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
#include <cstdio> // for EOF
|
#include <cstdio> // for EOF
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -42,6 +41,9 @@ int main(int argc, char* const argv[])
|
|||||||
{
|
{
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (argc < 4 || argc > 6 ) {
|
if (argc < 4 || argc > 6 ) {
|
||||||
|
|||||||
@ -21,7 +21,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <exiv2/exiv2.hpp>
|
#include <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
@ -30,6 +29,9 @@ int main(int argc, char* const argv[])
|
|||||||
try {
|
try {
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
std::cout << "Usage: " << argv[0] << " file\n";
|
std::cout << "Usage: " << argv[0] << " file\n";
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
// ***************************************************************** -*- C++ -*-
|
// ***************************************************************** -*- C++ -*-
|
||||||
// iptcprint.cpp
|
|
||||||
// Sample program to print the IPTC metadata of an image
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2004-2021 Exiv2 authors
|
* Copyright (C) 2004-2021 Exiv2 authors
|
||||||
* This program is part of the Exiv2 distribution.
|
* This program is part of the Exiv2 distribution.
|
||||||
@ -19,18 +17,21 @@
|
|||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
|
* 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 <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
int main(int argc, char* const argv[])
|
int main(int argc, char* const argv[])
|
||||||
try {
|
try {
|
||||||
|
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
std::cout << "Usage: " << argv[0] << " file\n";
|
std::cout << "Usage: " << argv[0] << " file\n";
|
||||||
|
|||||||
@ -17,10 +17,8 @@
|
|||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
|
* 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 <iostream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
@ -38,6 +36,9 @@ int main(int argc, char* const argv[])
|
|||||||
{
|
{
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
|||||||
@ -17,10 +17,8 @@
|
|||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
|
* 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 <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
@ -31,6 +29,9 @@ int main()
|
|||||||
{
|
{
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
int tc = 0;
|
int tc = 0;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|||||||
@ -21,7 +21,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <exiv2/exiv2.hpp>
|
#include <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
@ -30,6 +29,9 @@ int main(int argc, char* const argv[])
|
|||||||
try {
|
try {
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (argc != 3) {
|
if (argc != 3) {
|
||||||
std::cout << "Usage: " << argv[0] << " image datafile\n";
|
std::cout << "Usage: " << argv[0] << " image datafile\n";
|
||||||
|
|||||||
@ -17,10 +17,7 @@
|
|||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
|
* 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 <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
@ -36,6 +33,9 @@ int main(int argc, char* const argv[])
|
|||||||
try {
|
try {
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
// Handle command line arguments
|
// Handle command line arguments
|
||||||
Params params;
|
Params params;
|
||||||
|
|||||||
@ -21,7 +21,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <exiv2/exiv2.hpp>
|
#include <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
@ -31,6 +30,9 @@ int main(int argc, char* const argv[])
|
|||||||
try {
|
try {
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
std::cout << "Usage: " << argv[0] << " file\n";
|
std::cout << "Usage: " << argv[0] << " file\n";
|
||||||
|
|||||||
@ -20,10 +20,7 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
|
* Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "error.hpp"
|
#include <exiv2/exiv2.hpp>
|
||||||
#include "exif.hpp"
|
|
||||||
#include "image.hpp"
|
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
@ -31,6 +28,9 @@ int main(int argc, char* const argv[])
|
|||||||
{
|
{
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
|
|||||||
@ -82,6 +82,9 @@ int main(int argc,const char* argv[])
|
|||||||
{
|
{
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <exiv2/exiv2.hpp>
|
#include <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
@ -32,6 +31,9 @@ int main(int argc, char* const argv[])
|
|||||||
{
|
{
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
std::cout << "Usage: " << argv[0] << " file\n";
|
std::cout << "Usage: " << argv[0] << " file\n";
|
||||||
|
|||||||
@ -21,7 +21,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <exiv2/exiv2.hpp>
|
#include <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
@ -30,6 +29,9 @@ int main(int argc, char* const argv[])
|
|||||||
try {
|
try {
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
std::cout << "Usage: " << argv[0] << " file\n";
|
std::cout << "Usage: " << argv[0] << " file\n";
|
||||||
|
|||||||
@ -23,7 +23,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <exiv2/exiv2.hpp>
|
#include <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
@ -32,6 +31,9 @@ int main(int argc, char* const argv[])
|
|||||||
try {
|
try {
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
std::cout << "Usage: " << argv[0] << " file {--nocurl | --curl}\n\n";
|
std::cout << "Usage: " << argv[0] << " file {--nocurl | --curl}\n\n";
|
||||||
|
|||||||
@ -21,7 +21,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <exiv2/exiv2.hpp>
|
#include <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|
||||||
@ -60,6 +59,9 @@ int main()
|
|||||||
{
|
{
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
std::cout << std::setfill(' ');
|
std::cout << std::setfill(' ');
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <exiv2/exiv2.hpp>
|
#include <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
@ -30,6 +29,9 @@ int main(int argc, char* argv[])
|
|||||||
{
|
{
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
int rc = EXIT_SUCCESS;
|
int rc = EXIT_SUCCESS;
|
||||||
std::ostringstream out;
|
std::ostringstream out;
|
||||||
|
|||||||
@ -40,6 +40,9 @@ int main(int argc, char* const argv[])
|
|||||||
try {
|
try {
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
std::cout << "Usage: " << argv[0] << " file\n";
|
std::cout << "Usage: " << argv[0] << " file\n";
|
||||||
|
|||||||
@ -20,9 +20,7 @@
|
|||||||
// tiffaddpath-test.cpp
|
// tiffaddpath-test.cpp
|
||||||
// Test driver to test adding new tags to a TIFF composite structure
|
// Test driver to test adding new tags to a TIFF composite structure
|
||||||
|
|
||||||
|
|
||||||
#include <exiv2/exiv2.hpp>
|
#include <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
#include "tiffcomposite_int.hpp"
|
#include "tiffcomposite_int.hpp"
|
||||||
#include "makernote2_int.hpp"
|
#include "makernote2_int.hpp"
|
||||||
#include "tiffimage_int.hpp"
|
#include "tiffimage_int.hpp"
|
||||||
@ -84,6 +82,9 @@ int main(int argc, char* const argv[])
|
|||||||
{
|
{
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (argc != 3) {
|
if (argc != 3) {
|
||||||
std::cout << "Usage: " << argv[0] << " tag group\n"
|
std::cout << "Usage: " << argv[0] << " tag group\n"
|
||||||
|
|||||||
@ -18,14 +18,11 @@
|
|||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
|
* 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 <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#include "utils.hpp"
|
#include "utils.hpp"
|
||||||
#include "toexv.hpp"
|
#include "toexv.hpp"
|
||||||
|
|
||||||
@ -44,6 +41,9 @@ int main(int argc, char* const argv[])
|
|||||||
{
|
{
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Handle command line arguments
|
// Handle command line arguments
|
||||||
|
|||||||
@ -23,13 +23,15 @@
|
|||||||
// Simple tests for the wide-string error class WError
|
// Simple tests for the wide-string error class WError
|
||||||
|
|
||||||
#include <exiv2/exiv2.hpp>
|
#include <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
try {
|
try {
|
||||||
throw Exiv2::Error(Exiv2::kerGeneralError, "ARG1", "ARG2", "ARG3");
|
throw Exiv2::Error(Exiv2::kerGeneralError, "ARG1", "ARG2", "ARG3");
|
||||||
|
|||||||
@ -17,10 +17,8 @@
|
|||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
|
* 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 <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
@ -46,6 +44,9 @@ int main(int argc, char* const argv[])
|
|||||||
{
|
{
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
|||||||
@ -17,10 +17,8 @@
|
|||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
|
* 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 <iostream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -35,6 +33,9 @@ int main(int argc, char* const argv[])
|
|||||||
{
|
{
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
|
|||||||
@ -21,7 +21,6 @@
|
|||||||
// xmpdump.cpp
|
// xmpdump.cpp
|
||||||
// Sample program to dump the XMP packet of an image
|
// Sample program to dump the XMP packet of an image
|
||||||
#include <exiv2/exiv2.hpp>
|
#include <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -30,6 +29,9 @@ int main(int argc, char* const argv[])
|
|||||||
{
|
{
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
|
|||||||
@ -21,7 +21,6 @@
|
|||||||
// Read an XMP packet from a file, parse it and print all (known) properties.
|
// Read an XMP packet from a file, parse it and print all (known) properties.
|
||||||
|
|
||||||
#include <exiv2/exiv2.hpp>
|
#include <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
@ -30,6 +29,9 @@ int main(int argc, char* const argv[])
|
|||||||
try {
|
try {
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
std::cout << "Usage: " << argv[0] << " file\n";
|
std::cout << "Usage: " << argv[0] << " file\n";
|
||||||
|
|||||||
@ -21,7 +21,6 @@
|
|||||||
// Read an XMP packet from a file, parse and re-serialize it.
|
// Read an XMP packet from a file, parse and re-serialize it.
|
||||||
|
|
||||||
#include <exiv2/exiv2.hpp>
|
#include <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
@ -30,6 +29,9 @@ int main(int argc, char* const argv[])
|
|||||||
try {
|
try {
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
std::cout << "Usage: " << argv[0] << " file\n";
|
std::cout << "Usage: " << argv[0] << " file\n";
|
||||||
|
|||||||
@ -27,7 +27,6 @@
|
|||||||
// ========================================================================
|
// ========================================================================
|
||||||
|
|
||||||
#include <exiv2/exiv2.hpp>
|
#include <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
@ -37,6 +36,9 @@ int main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@ -39,6 +39,9 @@ int main()
|
|||||||
try {
|
try {
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXIV2_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
// The XMP property container
|
// The XMP property container
|
||||||
Exiv2::XmpData xmpData;
|
Exiv2::XmpData xmpData;
|
||||||
|
|||||||
@ -85,16 +85,14 @@ namespace Exiv2
|
|||||||
{
|
{
|
||||||
static bool enabled = false;
|
static bool enabled = false;
|
||||||
|
|
||||||
|
#ifdef EXV_ENABLE_BMFF
|
||||||
EXIV2API bool enableBMFF(bool enable)
|
EXIV2API bool enableBMFF(bool enable)
|
||||||
{
|
{
|
||||||
#ifdef EXV_ENABLE_BMFF
|
bool result = enabled;
|
||||||
enabled = enable;
|
enabled = enable ;
|
||||||
return true;
|
return result ;
|
||||||
#else
|
|
||||||
UNUSED(enable);
|
|
||||||
return false;
|
|
||||||
#endif // EXV_ENABLE_BMFF
|
|
||||||
}
|
}
|
||||||
|
#endif // EXV_ENABLE_BMFF
|
||||||
|
|
||||||
std::string Iloc::toString() const
|
std::string Iloc::toString() const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -17,15 +17,7 @@
|
|||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
|
* 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 <exiv2/exiv2.hpp>
|
||||||
|
|
||||||
// include local header files which are not part of libexiv2
|
// include local header files which are not part of libexiv2
|
||||||
@ -128,6 +120,9 @@ int main(int argc, char* const argv[])
|
|||||||
{
|
{
|
||||||
Exiv2::XmpParser::initialize();
|
Exiv2::XmpParser::initialize();
|
||||||
::atexit(Exiv2::XmpParser::terminate);
|
::atexit(Exiv2::XmpParser::terminate);
|
||||||
|
#ifdef EXV_ENABLE_BMFF
|
||||||
|
Exiv2::enableBMFF();
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef EXV_ENABLE_NLS
|
#ifdef EXV_ENABLE_NLS
|
||||||
setlocale(LC_ALL, "");
|
setlocale(LC_ALL, "");
|
||||||
@ -136,10 +131,6 @@ int main(int argc, char* const argv[])
|
|||||||
textdomain(EXV_PACKAGE_NAME);
|
textdomain(EXV_PACKAGE_NAME);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef EXV_ENABLE_BMFF
|
|
||||||
Exiv2::enableBMFF();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Handle command line arguments
|
// Handle command line arguments
|
||||||
Params& params = Params::instance();
|
Params& params = Params::instance();
|
||||||
if (params.getopt(argc, argv)) {
|
if (params.getopt(argc, argv)) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user