[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:36:12 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=532b0c3
The following commit has been merged in the master branch:
commit 532b0c33a749fb69718ba5713e9795ae2167897f
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Sat Mar 20 10:41:20 2004 +0000
Added Thumbnail::dataSize
---
src/exif.cpp | 33 +++++++++++++++++++++++++--------
src/exif.hpp | 16 ++++++++++++----
2 files changed, 37 insertions(+), 12 deletions(-)
diff --git a/src/exif.cpp b/src/exif.cpp
index 0f608b9..9f003e8 100644
--- a/src/exif.cpp
+++ b/src/exif.cpp
@@ -20,14 +20,14 @@
*/
/*
File: exif.cpp
- Version: $Name: $ $Revision: 1.30 $
+ Version: $Name: $ $Revision: 1.31 $
Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
History: 26-Jan-04, ahu: created
11-Feb-04, ahu: isolated as a component
*/
// *****************************************************************************
#include "rcsid.hpp"
-EXIV2_RCSID("@(#) $Name: $ $Revision: 1.30 $ $RCSfile: exif.cpp,v $")
+EXIV2_RCSID("@(#) $Name: $ $Revision: 1.31 $ $RCSfile: exif.cpp,v $")
// *****************************************************************************
// included header files
@@ -416,18 +416,34 @@ namespace Exif {
return size;
}
- long Thumbnail::size() const
+ long Thumbnail::dataSize() const
{
long size = 0;
switch (type_) {
case jpeg:
size = size_;
break;
- case tiff:
+ case tiff:
size = size_ - ifd_.offset() - ifd_.size() - ifd_.dataSize();
break;
- case none:
- size = 0;
+ case none:
+ size = 0;
+ break;
+ }
+ return size;
+ }
+
+ long Thumbnail::size() const
+ {
+ long size = 0;
+ switch (type_) {
+ case jpeg:
+ // fallthrough
+ case tiff:
+ size = size_;
+ break;
+ case none:
+ size = 0;
break;
}
return size;
@@ -743,13 +759,14 @@ std::cerr << "->>>>>> writing from metadata <<<<<<-
";
for (e = ifdEntries.begin(); e != eEnd; ++e) {
size += 2 + 12 * e->second + 4;
}
- size += thumbnail_.size();
+ // Add the size of the thumbnail image data (w/o IFD for TIFF thumbs)
+ size += thumbnail_.dataSize();
// Add 1k to account for the possibility that Thumbnail::update
// may add entries to IFD1
size += 1024;
}
return size;
- }
+ } // ExifData::size
void ExifData::add(Entries::const_iterator begin,
Entries::const_iterator end,
diff --git a/src/exif.hpp b/src/exif.hpp
index 2ba8d8e..e700933 100644
--- a/src/exif.hpp
+++ b/src/exif.hpp
@@ -21,7 +21,7 @@
/*!
@file exif.hpp
@brief Encoding and decoding of %Exif data
- @version $Name: $ $Revision: 1.29 $
+ @version $Name: $ $Revision: 1.30 $
@author Andreas Huggel (ahu)
<a href="mailto:ahuggel at gmx.net">ahuggel at gmx.net</a>
@date 09-Jan-04, ahu: created
@@ -312,10 +312,15 @@ namespace Exif {
*/
void setOffsets(Ifd& ifd1, ByteOrder byteOrder) const;
/*!
- @brief Return the size of the thumbnail data (data only, without the
- IFD, in case of a TIFF thumbnail.
+ @brief Return the size of the thumbnail image (the size it
+ would occupy when extracted from the %Exif data)
*/
long size() const;
+ /*!
+ @brief Return the size of the thumbnail data (data only, without the
+ IFD, in case of a TIFF thumbnail).
+ */
+ long dataSize() const;
//! Return the type of the thumbnail
Type type() const { return type_; }
//@}
@@ -579,7 +584,10 @@ namespace Exif {
{ return thumbnail_.write(path); }
//! Return the type of the thumbnail
Thumbnail::Type thumbnailType() const { return thumbnail_.type(); }
- //! Return the size of the thumbnail data
+ /*!
+ @brief Return the size of the thumbnail image. This is the size it
+ would occupy when extracted from the %Exif data).
+ */
long thumbnailSize() const { return thumbnail_.size(); }
//@}
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list