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++ -*-
|
||||
/*
|
||||
* 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…
Reference in New Issue
Block a user