Exiv2
exiv2.hpp
Go to the documentation of this file.
1 // ***************************************************************** -*- C++ -*-
2 /*
3  * Copyright (C) 2004-2018 Exiv2 authors
4  * This program is part of the Exiv2 distribution.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
19  */
27 #ifndef EXIV2_HPP_
28 #define EXIV2_HPP_
29 
30 // *****************************************************************************
31 // included header files
32 #include "exiv2/config.h"
33 #include "exiv2/datasets.hpp"
34 #include "exiv2/basicio.hpp"
35 #include "exiv2/bmpimage.hpp"
36 #include "exiv2/convert.hpp"
37 #include "exiv2/cr2image.hpp"
38 #include "exiv2/crwimage.hpp"
39 #include "exiv2/easyaccess.hpp"
40 #include "exiv2/epsimage.hpp"
41 #include "exiv2/error.hpp"
42 #include "exiv2/exif.hpp"
43 #include "exiv2/futils.hpp"
44 #include "exiv2/gifimage.hpp"
45 #include "exiv2/http.hpp"
46 #include "exiv2/image.hpp"
47 #include "exiv2/ini.hpp"
48 #include "exiv2/iptc.hpp"
49 #include "exiv2/jp2image.hpp"
50 #include "exiv2/jpgimage.hpp"
51 #include "exiv2/metadatum.hpp"
52 #include "exiv2/mrwimage.hpp"
53 #include "exiv2/orfimage.hpp"
54 #include "exiv2/pgfimage.hpp"
55 
56 #ifdef EXV_HAVE_LIBZ
57 #include "exiv2/pngimage.hpp"
58 #endif
59 
60 #include "exiv2/preview.hpp"
61 #include "exiv2/properties.hpp"
62 #include "exiv2/psdimage.hpp"
63 #include "exiv2/rafimage.hpp"
64 #include "exiv2/rw2image.hpp"
65 
66 #ifdef EXV_USE_SSH
67 #include "exiv2/ssh.hpp"
68 #endif
69 
70 #include "exiv2/tags.hpp"
71 #include "exiv2/tgaimage.hpp"
72 #include "exiv2/tiffimage.hpp"
73 #include "exiv2/types.hpp"
74 #include "exiv2/value.hpp"
75 #include "exiv2/version.hpp"
76 #include "exiv2/xmp_exiv2.hpp"
77 #include "exiv2/xmpsidecar.hpp"
78 
79 #endif // #ifndef EXIV2_HPP_
Params::timestamp_
bool timestamp_
Rename also sets the file timestamp.
Definition: exiv2app.hpp:227
Params::directory_
std::string directory_
Location for files to extract/insert.
Definition: exiv2app.hpp:246
Exiv2::XmpProperties::propertyType
static TypeId propertyType(const XmpKey &key)
Return the type for property key. The default for unknown keys is xmpText.
Exiv2::ImageType::xmp
const int xmp
XMP sidecar files (see class XmpSidecar)
Definition: xmpsidecar.hpp:45
ModifyCmds
std::vector< ModifyCmd > ModifyCmds
Container for modification commands.
Definition: exiv2app.hpp:96
CmdIdAndString
Structure to link command identifiers to strings.
Definition: exiv2app.hpp:98
tgaimage.hpp
Truevision TARGA v2 image, implemented using the following references: Truevision TGA page on Wikiped...
Exiv2::DataBuf::pData_
byte * pData_
Pointer to the buffer, 0 if none has been allocated.
Definition: types.hpp:269
psdimage.hpp
Photoshop image, implemented using the following references: Adobe Photoshop 6.0 File Format Specific...
utils.hpp
A collection of utility functions.
exif.hpp
Encoding and decoding of Exif data.
crwimage.hpp
Class CrwImage to access Canon CRW images. References: The Canon RAW (CRW) File Format by Phil Harv...
Params::adjustment_
long adjustment_
Adjustment in seconds.
Definition: exiv2app.hpp:238
Params::YodAdjust::flag_
bool flag_
Adjustment flag.
Definition: exiv2app.hpp:215
bmpimage.hpp
Windows Bitmap (BMP) image.
metadatum.hpp
Provides abstract base classes Metadatum and Key.
ModifyCmd::metadataId_
MetadataId metadataId_
Metadata identifier.
Definition: exiv2app.hpp:89
Params::cmdFiles_
CmdFiles cmdFiles_
Names of the modification command files.
Definition: exiv2app.hpp:242
types.hpp
Type definitions for Exiv2 and related functionality.
Params::preserve_
bool preserve_
Preserve timestamps flag.
Definition: exiv2app.hpp:226
exiv2.hpp
Include all Exiv2 header files.
CmdId
CmdId
Command identifiers.
Definition: exiv2app.hpp:70
ModifyCmd
Structure for one parsed modification command.
Definition: exiv2app.hpp:82
Params::printItems_
unsigned long printItems_
Print items.
Definition: exiv2app.hpp:232
Exiv2::LogMsg::setLevel
static void setLevel(Level level)
Set the log level. Only log messages with a level greater or equal level are sent to the log message ...
Definition: error.cpp:191
Exiv2::AnyError
Error class interface. Allows the definition and use of a hierarchy of error classes which can all be...
Definition: error.hpp:174
version.hpp
Precompiler define and a function to test the Exiv2 version. References: Similar versioning defines a...
Params::cleanup
void cleanup()
Destructor.
Definition: exiv2.cpp:216
Params::verbose_
bool verbose_
Verbose (talkative) option flag.
Definition: exiv2app.hpp:222
Params::fileExistsPolicy_
FileExistsPolicy fileExistsPolicy_
What to do if file to rename exists.
Definition: exiv2app.hpp:229
Params::binary_
bool binary_
Suppress long binary values.
Definition: exiv2app.hpp:224
Params::keys_
Keys keys_
List of keys to match from the metadata.
Definition: exiv2app.hpp:251
ModifyCmd::value_
std::string value_
Data.
Definition: exiv2app.hpp:93
Params::cmdLines_
CmdLines cmdLines_
Commands from the command line.
Definition: exiv2app.hpp:243
Params::previewNumbers_
PreviewNumbers previewNumbers_
List of preview numbers.
Definition: exiv2app.hpp:249
Exiv2::XmpKey
Concrete keys for XMP metadata.
Definition: properties.hpp:241
Params::printMode_
PrintMode printMode_
Print mode.
Definition: exiv2app.hpp:231
Params::modifyCmds_
ModifyCmds modifyCmds_
Parsed modification commands.
Definition: exiv2app.hpp:244
gifimage.hpp
GIF image, implemented using the following references: GIF89 specification by W3C
Params::version_
bool version_
Version option flag.
Definition: exiv2app.hpp:221
cr2image.hpp
Class Cr2Image.
rafimage.hpp
Fujifilm RAW image.
Exiv2::Internal::Tag::all
const uint32_t all
Special tag: all tags in a group.
Definition: tiffcomposite_int.hpp:82
Exiv2::IptcDataSets::dataSetType
static TypeId dataSetType(uint16_t number, uint16_t recordId)
Return the type for dataSet number and Record id.
Definition: datasets.cpp:478
Params::help_
bool help_
Help option flag.
Definition: exiv2app.hpp:220
Params::timestampOnly_
bool timestampOnly_
Rename only sets the file timestamp.
Definition: exiv2app.hpp:228
Params::printTarget
static std::string printTarget(const std::string &before, int target, bool bPrint=false, std::ostream &os=std::cout)
Print target_.
Definition: exiv2.cpp:253
xmpsidecar.hpp
An Image subclass to support XMP sidecar files.
pgfimage.hpp
PGF image, implemented using the following references: PGF specification from libpgf web site
Exiv2::TypeInfo::typeId
static TypeId typeId(const std::string &typeName)
Return the type id for a type name.
Definition: types.cpp:114
preview.hpp
Classes to access all preview images embedded in an image.
Exiv2::getProcessPath
EXIV2API std::string getProcessPath()
Return the path of the current process.
Definition: futils.cpp:474
Exiv2::convertStringCharset
EXIV2API bool convertStringCharset(std::string &str, const char *from, const char *to)
Convert character encoding of str from from to to. If the function succeeds, str contains the result ...
Definition: convert.cpp:1348
Exiv2::XmpParser::terminate
static void terminate()
Terminate the XMP Toolkit and unregister custom namespaces.
Definition: xmp.cpp:540
Exiv2::invalidTypeId
@ invalidTypeId
Invalid type id.
Definition: types.hpp:157
Params::YodAdjust::option_
const char * option_
Adjustment option string.
Definition: exiv2app.hpp:216
Exiv2::byte
uint8_t byte
1 byte unsigned integer type.
Definition: types.hpp:105
Params::PreviewNumbers
std::set< int > PreviewNumbers
Container for preview image numbers.
Definition: exiv2app.hpp:150
Exiv2::XmpProperties::unregisterNs
static void unregisterNs()
Unregister all custom namespaces.
MetadataId
MetadataId
Metadata identifiers.
Definition: exiv2app.hpp:75
ModifyCmd::key_
std::string key_
Exiv2 key string.
Definition: exiv2app.hpp:88
mrwimage.hpp
Minolta RAW image, implemented using the following references: Minolta Raw file format by Dalibor Jel...
exiv2app.hpp
Defines class Params, used for the command line handling of exiv2.
Params::CmdLines
std::vector< std::string > CmdLines
Container for commands from the command line.
Definition: exiv2app.hpp:146
Params::formatSet_
bool formatSet_
Whether the format is set with -r.
Definition: exiv2app.hpp:241
Exiv2::DataBuf
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition: types.hpp:204
Exiv2::DataBuf::alloc
void alloc(long size)
Allocate a data buffer of at least the given size. Note that if the requested size is less than the c...
Definition: types.cpp:161
Params::help
void help(std::ostream &os=std::cout) const
Print further usage explanations to an output stream.
Definition: exiv2.cpp:272
Exiv2::ExifKey
Concrete keys for Exif metadata and access to Exif tag reference data.
Definition: tags.hpp:148
Exiv2::DataBuf::size_
long size_
The current size of the buffer.
Definition: types.hpp:271
Params::charset_
std::string charset_
Charset to use for UNICODE Exif user comment.
Definition: exiv2app.hpp:252
Params::YodAdjust
Structure for year, month and day adjustment command line arguments.
Definition: exiv2app.hpp:214
Params::unknown_
bool unknown_
Suppress unknown tags.
Definition: exiv2app.hpp:225
Params::instance
static Params & instance()
Controls all access to the global Params instance.
Definition: exiv2.cpp:200
Util::strtol
bool strtol(const char *nptr, long &n)
Convert a C string to a long value, which is returned in n. Returns true if the conversion is success...
Definition: utils.cpp:104
orfimage.hpp
Olympus RAW image.
Params::usage
void usage(std::ostream &os=std::cout) const
Print a minimal usage note to an output stream.
Definition: exiv2.cpp:246
properties.hpp
XMP property and type information. References: XMP Specification from Adobe (Property descriptions c...
Params::yodAdjust_
YodAdjust yodAdjust_[3]
Year, month and day adjustment info.
Definition: exiv2app.hpp:239
value.hpp
Value interface and concrete subclasses.
convert.hpp
Exif and IPTC conversions to and from XMP.
Params::printTags_
unsigned long printTags_
Print tags (bitmap of MetadataId flags). Action (integer rather than TaskType to avoid dependency).
Definition: exiv2app.hpp:233
Exiv2::TypeId
TypeId
Exiv2 value type identifiers.
Definition: types.hpp:130
Params::target_
int target_
What common target to process.
Definition: exiv2app.hpp:236
image.hpp
Exiv2::ImageType::none
const int none
Not an image.
Definition: image.hpp:48
Exiv2::XmpProperties::registerNs
static void registerNs(const std::string &ns, const std::string &prefix)
Register namespace ns with preferred prefix prefix.
Params::adjust_
bool adjust_
Adjustment flag.
Definition: exiv2app.hpp:230
Exiv2_grep_key_t
exv_grep_key_t is a simple string and the ignore flag
Definition: version.hpp:51
Params::greps_
Greps greps_
List of keys to 'grep' from the metadata.
Definition: exiv2app.hpp:250
easyaccess.hpp
Provides easy (high-level) access to some Exif meta data.
Params::getopt
int getopt(int argc, char *const argv[])
Call Getopt::getopt() with optstring, to inititate command line argument parsing, perform consistency...
Params::format_
std::string format_
Filename format (-r option arg).
Definition: exiv2app.hpp:240
Params::files_
Files files_
List of non-option arguments.
Definition: exiv2app.hpp:248
Params::getStdin
void getStdin(Exiv2::DataBuf &buf)
getStdin binary data read from stdin to DataBuf
Params
Implements the command line handling for the program.
Definition: exiv2app.hpp:138
Exiv2::time
@ time
IPTC time type.
Definition: types.hpp:149
Params::suffix_
std::string suffix_
File extension of the file to insert.
Definition: exiv2app.hpp:247
Exiv2::dumpLibraryInfo
EXIV2API void dumpLibraryInfo(std::ostream &os, const exv_grep_keys_t &keys)
dumpLibraryInfo implements the exiv2 option –version –verbose used by exiv2 test suite to inspect lib...
Definition: version.cpp:236
Params::YodAdjust::adjustment_
long adjustment_
Adjustment value.
Definition: exiv2app.hpp:217
pngimage.hpp
PNG image, implemented using the following references: PNG specification by W3C PNG tags list by Phi...
epsimage.hpp
EPS image. References: [1] Adobe PostScript Language Document Structuring Conventions Specification...
Params::option
virtual int option(int opt, const std::string &optarg, int optopt)
Handle options and their arguments.
Exiv2::Error
BasicError< char > Error
Error class used for exceptions (std::string based)
Definition: error.hpp:323
Exiv2::IptcKey
Concrete keys for IPTC metadata.
Definition: datasets.hpp:275
ModifyCmd::cmdId_
CmdId cmdId_
Command identifier.
Definition: exiv2app.hpp:87
Params::CmdFiles
std::vector< std::string > CmdFiles
Container for command files.
Definition: exiv2app.hpp:144
Exiv2::XmpParser::initialize
static bool initialize(XmpParser::XmpLockFct xmpLockFct=0, void *pLockData=0)
Initialize the XMP Toolkit.
Definition: xmp.cpp:478
Params::nonoption
virtual int nonoption(const std::string &argv)
Handle non-option parameters.
Params::jpegComment_
std::string jpegComment_
Jpeg comment to set in the image.
Definition: exiv2app.hpp:245
Params::force_
bool force_
Force overwrites flag.
Definition: exiv2app.hpp:223
tags.hpp
Exif tag and type information.
Exiv2::string
@ string
IPTC string type.
Definition: types.hpp:147
datasets.hpp
IPTC dataset and type information.
Exiv2::toString
std::string toString(const T &arg)
Utility function to convert the argument of any type to a string.
Definition: types.hpp:521
rw2image.hpp
Class Rw2Image.
Params::stdinBuf
Exiv2::DataBuf stdinBuf
DataBuf with the binary bytes from stdin.
Definition: exiv2app.hpp:254
ModifyCmd::typeId_
Exiv2::TypeId typeId_
Exiv2 type identifier Flag to indicate if the type was explicitly specified (true)
Definition: exiv2app.hpp:90
futils.hpp
Basic file utility functions required by Exiv2.
error.hpp
Error class for exceptions, log message class.
jpgimage.hpp
Class JpegImage to access JPEG images.
iptc.hpp
Encoding and decoding of IPTC data.
Params::version
void version(bool verbose=false, std::ostream &os=std::cout) const
Print version information to an output stream.
Definition: exiv2.cpp:222