[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:46:49 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=5f9807c
The following commit has been merged in the master branch:
commit 5f9807cbef727f4f0583ceaf6ffc4ee508c74d69
Author: Robin Mills <robin at clanmills.com>
Date: Tue Aug 30 16:05:45 2016 +0000
#1216. Rollback r4448/6/2/1 r4439/38 to restabilize test suite on trunk. r4449 is copy of r4448 to branches/develop
---
include/exiv2/exif.hpp | 1313 +++++++++++++++++++++----------------------
include/exiv2/exv_msvc.h | 4 -
include/exiv2/image.hpp | 1 -
include/exiv2/tags.hpp | 48 +-
src/canonmn.cpp | 349 +++++-------
src/canonmn_int.hpp | 3 -
src/exif.cpp | 44 +-
src/image.cpp | 27 -
src/tags.cpp | 37 +-
src/version.cpp | 12 +-
test/data/bugfixes-test.out | Bin 1911711 -> 1911680 bytes
test/data/exifdata-test.out | 96 ++--
test/data/exiv2-test.out | 778 ++++++++++++-------------
test/data/write-test.out | 52 +-
test/exifdata-test.sh | 4 +-
15 files changed, 1244 insertions(+), 1524 deletions(-)
diff --git a/include/exiv2/exif.hpp b/include/exiv2/exif.hpp
index 71a73de..92b7a91 100644
--- a/include/exiv2/exif.hpp
+++ b/include/exiv2/exif.hpp
@@ -1,682 +1,631 @@
-// ***************************************************************** -*- C++ -*-
-/*
- * Copyright (C) 2004-2015 Andreas Huggel <ahuggel at gmx.net>
- *
- * 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.
- */
-/*!
- @file exif.hpp
- @brief Encoding and decoding of Exif data
- @version $Rev: 3091 $
- @author Andreas Huggel (ahu)
- <a href="mailto:ahuggel at gmx.net">ahuggel at gmx.net</a>
- @date 09-Jan-04, ahu: created
- */
-#ifndef EXIF_HPP_
-#define EXIF_HPP_
-
-// *****************************************************************************
-// included header files
-#include "metadatum.hpp"
-#include "tags.hpp"
-#include "value.hpp"
-#include "types.hpp"
-
-// + standard includes
-#include <string>
-#include <list>
-#include <memory>
-
-// *****************************************************************************
-// namespace extensions
-/*!
- @brief Provides classes and functions to encode and decode Exif and Iptc data.
- The <b>libexiv2</b> API consists of the objects of this namespace.
- */
-namespace Exiv2 {
-
-// *****************************************************************************
-// class declarations
- class ExifData;
-
-// *****************************************************************************
-// class definitions
-
- /*!
- @brief An Exif metadatum, consisting of an ExifKey and a Value and
- methods to manipulate these.
- */
- class EXIV2API Exifdatum : public Metadatum {
- template<typename T> friend Exifdatum& setValue(Exifdatum&, const T&);
- public:
- //! @name Creators
- //@{
- /*!
- @brief Constructor for new tags created by an application. The
- %Exifdatum is created from a \em key / value pair. %Exifdatum copies
- (clones) the \em key and value if one is provided. Alternatively,
- a program can create an 'empty' %Exifdatum with only a key
- and set the value using setValue().
-
- @param key %ExifKey.
- @param pValue Pointer to an %Exifdatum value.
- @throw Error if the key cannot be parsed and converted.
- */
- explicit Exifdatum(const ExifKey& key, const Value* pValue =0);
- //! Copy constructor
- Exifdatum(const Exifdatum& rhs);
- //! Destructor
- virtual ~Exifdatum();
- //@}
-
- //! @name Manipulators
- //@{
- //! Assignment operator
- Exifdatum& operator=(const Exifdatum& rhs);
- /*!
- @brief Assign \em value to the %Exifdatum. The type of the new Value
- is set to UShortValue.
- */
- Exifdatum& operator=(const uint16_t& value);
- /*!
- @brief Assign \em value to the %Exifdatum. The type of the new Value
- is set to ULongValue.
- */
- Exifdatum& operator=(const uint32_t& value);
- /*!
- @brief Assign \em value to the %Exifdatum. The type of the new Value
- is set to URationalValue.
- */
- Exifdatum& operator=(const URational& value);
- /*!
- @brief Assign \em value to the %Exifdatum. The type of the new Value
- is set to ShortValue.
- */
- Exifdatum& operator=(const int16_t& value);
- /*!
- @brief Assign \em value to the %Exifdatum. The type of the new Value
- is set to LongValue.
- */
- Exifdatum& operator=(const int32_t& value);
- /*!
- @brief Assign \em value to the %Exifdatum. The type of the new Value
- is set to RationalValue.
- */
- Exifdatum& operator=(const Rational& value);
- /*!
- @brief Assign \em value to the %Exifdatum.
- Calls setValue(const std::string&).
- */
- Exifdatum& operator=(const std::string& value);
- /*!
- @brief Assign \em value to the %Exifdatum.
- Calls setValue(const Value*).
- */
- Exifdatum& operator=(const Value& value);
- void setValue(const Value* pValue);
- /*!
- @brief Set the value to the string \em value. Uses Value::read(const
- std::string&). If the %Exifdatum does not have a Value yet,
- then a %Value of the correct type for this %Exifdatum is
- created. An AsciiValue is created for unknown tags. Return
- 0 if the value was read successfully.
- */
- int setValue(const std::string& value);
- /*!
- @brief Set the data area by copying (cloning) the buffer pointed to
- by \em buf.
-
- Values may have a data area, which can contain additional
- information besides the actual value. This method is used to set such
- a data area.
-
- @param buf Pointer to the source data area
- @param len Size of the data area
- @return Return -1 if the %Exifdatum does not have a value yet or the
- value has no data area, else 0.
- */
- int setDataArea(const byte* buf, long len);
- //@}
-
- //! @name Accessors
- //@{
- //! Return the key of the %Exifdatum.
- std::string key() const;
- const char* familyName() const;
- std::string groupName() const;
- std::string tagName() const;
- std::string tagLabel() const;
- uint16_t tag() const;
- //! Return the IFD id as an integer. (Do not use, this is meant for library internal use.)
- int ifdId() const;
- //! Return the name of the IFD
- const char* ifdName() const;
- //! Return the index (unique id of this key within the original IFD)
- int idx() const;
- /*!
- @brief Write value to a data buffer and return the number
- of bytes written.
-
- The user must ensure that the buffer has enough memory. Otherwise
- the call results in undefined behaviour.
-
- @param buf Data buffer to write to.
- @param byteOrder Applicable byte order (little or big endian).
- @return Number of characters written.
- */
- long copy(byte* buf, ByteOrder byteOrder) const;
- std::ostream& write(std::ostream& os, const ExifData* pMetadata =0) const;
- //! Return the type id of the value
- TypeId typeId() const;
- //! Return the name of the type
- const char* typeName() const;
- //! Return the size in bytes of one component of this type
- long typeSize() const;
- //! Return the number of components in the value
- long count() const;
- //! Return the size of the value in bytes
- long size() const;
- //! Return the value as a string.
- std::string toString() const;
- std::string toString(long n) const;
- long toLong(long n =0) const;
- float toFloat(long n =0) const;
- Rational toRational(long n =0) const;
- Value::AutoPtr getValue() const;
- const Value& value() const;
- /*!
- @brief Compare the two parameters according to the comparator
- function given and return the result.
-
- @param lhs Parameter to compare from.
- @param rhs Parameter to compare to.
- @param compO Type of comparison to be done. @see TagInfo::compOperator.
- @return Result of the comparison.
- */
- template <typename T>
- bool compare(const T &lhs, const T &rhs, const TagInfo::compOperator &compO) const
- {
- switch (compO)
- {
- case TagInfo::equal_to:
- {
- return (lhs == rhs);
- }
- case TagInfo::not_equal_to:
- {
- return lhs != rhs;
- }
- case TagInfo::less:
- {
- return lhs < rhs;
- }
- case TagInfo::less_equal:
- {
- return (lhs <= rhs);
- }
- case TagInfo::greater:
- {
- return (lhs > rhs);
- }
- case TagInfo::greater_equal:
- {
- return lhs >= rhs;
- }
- default:
- return false;
- }
- }
- /*!
- @brief Determine whether this Exif tag has ignorable default values
- If so, examine whether current value should be ignored.
- Depending upon the underlying type the default and current values
- are converted to the same type and then compared.
-
- @return true if it can be ignored, false otherwise.
- */
- bool ignore(void) const;
- //! Return the size of the data area.
- long sizeDataArea() const;
- /*!
- @brief Return a copy of the data area of the value. The caller owns
- this copy and %DataBuf ensures that it will be deleted.
-
- Values may have a data area, which can contain additional
- information besides the actual value. This method is used to access
- such a data area.
-
- @return A %DataBuf containing a copy of the data area or an empty
- %DataBuf if the value does not have a data area assigned or the
- value is not set.
- */
- DataBuf dataArea() const;
- //@}
-
- private:
- // DATA
- ExifKey::AutoPtr key_; //!< Key
- Value::AutoPtr value_; //!< Value
-
- }; // class Exifdatum
-
- /*!
- @brief Access to a Exif %thumbnail image. This class provides higher level
- accessors to the thumbnail image that is optionally embedded in IFD1
- of the Exif data. These methods do not write to the Exif metadata.
- Manipulators are provided in subclass ExifThumb.
-
- @note Various other preview and thumbnail images may be contained in an
- image, depending on its format and the camera make and model. This
- class only provides access to the Exif thumbnail as specified in the
- Exif standard.
- */
- class EXIV2API ExifThumbC {
- public:
- //! @name Creators
- //@{
- //! Constructor.
- ExifThumbC(const ExifData& exifData);
- //@}
-
- //! @name Accessors
- //@{
- /*!
- @brief Return the thumbnail image in a %DataBuf. The caller owns the
- data buffer and %DataBuf ensures that it will be deleted.
- */
- DataBuf copy() const;
- /*!
- @brief Write the thumbnail image to a file.
-
- A filename extension is appended to \em path according to the image
- type of the thumbnail, so \em path should not include an extension.
- The function will overwrite an existing file of the same name.
-
- @param path File name of the thumbnail without extension.
- @return The number of bytes written.
- */
- long writeFile(const std::string& path) const;
-#ifdef EXV_UNICODE_PATH
- /*!
- @brief Like writeFile() but accepts a unicode path in an std::wstring.
- @note This function is only available on Windows.
- */
- long writeFile(const std::wstring& wpath) const;
-#endif
- /*!
- @brief Return the MIME type of the thumbnail, either
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list