Added functions to access thumbnail type and size

v0.27.3
Andreas Huggel 22 years ago
parent 9890b51ed2
commit 058a44c5d1

@ -21,7 +21,7 @@
/*! /*!
@file exif.hpp @file exif.hpp
@brief Encoding and decoding of %Exif data @brief Encoding and decoding of %Exif data
@version $Name: $ $Revision: 1.20 $ @version $Name: $ $Revision: 1.21 $
@author Andreas Huggel (ahu) @author Andreas Huggel (ahu)
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a> <a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
@date 09-Jan-04, ahu: created @date 09-Jan-04, ahu: created
@ -263,11 +263,6 @@ namespace Exif {
behaviour. Return the number of characters written. behaviour. Return the number of characters written.
*/ */
long copy(char* buf) const; long copy(char* buf) const;
/*!
@brief Return the size of the thumbnail data (data only, without the
IFD, in case of a TIFF thumbnail.
*/
long size() const;
/*! /*!
@brief Update the %Exif data according to the actual thumbnail image. @brief Update the %Exif data according to the actual thumbnail image.
@ -289,6 +284,13 @@ namespace Exif {
offsets set by this method. offsets set by this method.
*/ */
void setOffsets(Ifd& ifd1, ByteOrder byteOrder) const; 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.
*/
long size() const;
//! Return the type of the thumbnail
Type type() const { return type_; }
private: private:
@ -394,15 +396,6 @@ namespace Exif {
@return Number of characters written to the buffer. @return Number of characters written to the buffer.
*/ */
long copy(char* buf); long copy(char* buf);
/*!
@brief Return the approximate size of all %Exif data (TIFF header plus
metadata). The number returned may be bigger than the actual
size of the %Exif data, but it is never smaller. Only copy()
returns the exact size.
*/
long size() const;
//! Returns the byte order as specified in the TIFF header
ByteOrder byteOrder() const { return tiffHeader_.byteOrder(); }
/*! /*!
@brief Add all IFD entries in the range from iterator position begin @brief Add all IFD entries in the range from iterator position begin
to iterator position end to the %Exif metadata. Checks for to iterator position end to the %Exif metadata. Checks for
@ -426,6 +419,16 @@ namespace Exif {
*/ */
void add(const Metadatum& metadatum); void add(const Metadatum& metadatum);
/*!
@brief Return the approximate size of all %Exif data (TIFF header plus
metadata). The number returned may be bigger than the actual
size of the %Exif data, but it is never smaller. Only copy()
returns the exact size.
*/
long size() const;
//! Returns the byte order as specified in the TIFF header
ByteOrder byteOrder() const { return tiffHeader_.byteOrder(); }
//! Metadata iterator type //! Metadata iterator type
typedef Metadata::iterator iterator; typedef Metadata::iterator iterator;
//! Metadata const iterator type //! Metadata const iterator type
@ -458,6 +461,10 @@ namespace Exif {
*/ */
int writeThumbnail(const std::string& path) const int writeThumbnail(const std::string& path) const
{ return thumbnail_.write(path); } { return thumbnail_.write(path); }
//! Return the type of the thumbnail
Thumbnail::Type thumbnailType() const { return thumbnail_.type(); }
//! Return the size of the thumbnail data
long thumbnailSize() const { return thumbnail_.size(); }
private: private:
// Return a pointer to the internal IFD identified by its IFD id // Return a pointer to the internal IFD identified by its IFD id

Loading…
Cancel
Save