[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:38:19 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=6c36a67

The following commit has been merged in the master branch:
commit 6c36a67738853a28a05e956d1306d4041844a696
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Wed Feb 28 16:05:10 2007 +0000

    Added Image method to access the MIME type.
---
 doc/ChangeLog     |  7 ++++---
 src/cr2image.hpp  |  5 +++++
 src/crwimage.hpp  |  5 +++++
 src/image.hpp     | 11 +++++++++++
 src/jpgimage.hpp  |  4 ++--
 src/mrwimage.hpp  |  5 +++++
 src/pngimage.hpp  |  5 +++++
 src/rafimage.hpp  |  5 +++++
 src/tiffimage.hpp |  5 +++++
 9 files changed, 47 insertions(+), 5 deletions(-)

diff --git a/doc/ChangeLog b/doc/ChangeLog
index 4598b8d..676b1ff 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -19,10 +19,11 @@ Changes from version 0.12 to 0.13
 	- 0000461: [miscellaneous] Add i18n support. Requires gettext.
 	           (Gilles Caulier)
 	           The currently available translations are still work in progress:
-	           German, Spanish, Polish by Gilles Caulier, ported from libexif
 	           Finnish by Mikael Lammentausta
 	           French by Gilles Caulier (ported from libexif) and Olivier Tilloy
+	           German by Gilles Caulier (ported from libexif) and Oliver Dörr
 	           Russian by Alexandre Prokoudine
+	           Polish, Spanish by Gilles Caulier, ported from libexif
 	- 0000460: [exif] Exiv2 should support to decode/encode Windows tags
 	           Exif.Image.0x9c9b-0x9c9f. Requires libiconv. 
 	           (Suggested by Jose Oliver)
@@ -31,9 +32,9 @@ Changes from version 0.12 to 0.13
 	           lens database.
 	         - [exif] Added read-support for Fujifilm RAF images.
 	         - [exif] Image class hierarchy refactored: Image now has containers
-		   and provides default implementations for most methods. Calling 
+	           and provides default implementations for most methods. Calling 
 	           an unsupported method of any Image subclass now results in an 
-	           exception.
+	           exception. Added a method to access the MIME type of an image.
 
 * MSVC related
 	         - [exivsimple] Added get and set thumbnail functions.
diff --git a/src/cr2image.hpp b/src/cr2image.hpp
index 3738748..6003902 100644
--- a/src/cr2image.hpp
+++ b/src/cr2image.hpp
@@ -102,6 +102,11 @@ namespace Exiv2 {
         void setComment(const std::string& comment);
         //@}
 
+        //! @name Accessors
+        //@{
+        std::string mimeType() const { return "image/x-canon-cr2"; }
+        //@}
+
     private:
         //! @name NOT implemented
         //@{
diff --git a/src/crwimage.hpp b/src/crwimage.hpp
index 81f91e5..29742cf 100644
--- a/src/crwimage.hpp
+++ b/src/crwimage.hpp
@@ -118,6 +118,11 @@ namespace Exiv2 {
         void setIptcData(const IptcData& iptcData);
         //@}
 
+        //! @name Accessors
+        //@{
+        std::string mimeType() const { return "image/x-canon-crw"; }
+        //@}
+
     private:
         //! @name NOT Implemented
         //@{
diff --git a/src/image.hpp b/src/image.hpp
index 5ef408d..efa3132 100644
--- a/src/image.hpp
+++ b/src/image.hpp
@@ -201,6 +201,17 @@ namespace Exiv2 {
          */
         bool good() const;
         /*!
+          @brief Return the MIME type of the image.
+
+          @note For each supported image format, the library knows only one MIME
+          type.  This may not be the most specific MIME type for that format. In
+          particular, several RAW formats are variants of the TIFF format with
+          the same magic as TIFF itself. Class TiffImage handles most of them
+          and thus they all have MIME type "image/tiff", although a more
+          specific MIME type may exist (e.g., "image/x-nikon-nef").
+         */
+        virtual std::string mimeType() const =0;
+        /*!
           @brief Returns an ExifData instance containing currently buffered
               Exif data.
 
diff --git a/src/jpgimage.hpp b/src/jpgimage.hpp
index 440868c..1a253e9 100644
--- a/src/jpgimage.hpp
+++ b/src/jpgimage.hpp
@@ -265,7 +265,7 @@ namespace Exiv2 {
         //@}
         //! @name Accessors
         //@{
-        AccessMode checkMode(MetadataId metadataId) const;
+        std::string mimeType() const { return "image/jpeg"; }
         //@}
     protected:
         //! @name Accessors
@@ -323,7 +323,7 @@ namespace Exiv2 {
         //@}
         //! @name Accessors
         //@{
-        AccessMode checkMode(MetadataId metadataId) const;
+        std::string mimeType() const { return "image/x-exv"; }
         //@}
     protected:
         //! @name Accessors
diff --git a/src/mrwimage.hpp b/src/mrwimage.hpp
index a81ec6f..576ce73 100644
--- a/src/mrwimage.hpp
+++ b/src/mrwimage.hpp
@@ -101,6 +101,11 @@ namespace Exiv2 {
         void setComment(const std::string& comment);
         //@}
 
+        //! @name Accessors
+        //@{
+        std::string mimeType() const { return "image/x-minolta-mrw"; }
+        //@}
+
     private:
         //! @name NOT Implemented
         //@{
diff --git a/src/pngimage.hpp b/src/pngimage.hpp
index d0cf3ea..65ae234 100644
--- a/src/pngimage.hpp
+++ b/src/pngimage.hpp
@@ -104,6 +104,11 @@ namespace Exiv2 {
         void setComment(const std::string& comment);
         //@}
 
+        //! @name Accessors
+        //@{
+        std::string mimeType() const { return "image/png"; }
+        //@}
+
     private:
         //! @name NOT implemented
         //@{
diff --git a/src/rafimage.hpp b/src/rafimage.hpp
index e3369a2..83e742d 100644
--- a/src/rafimage.hpp
+++ b/src/rafimage.hpp
@@ -100,6 +100,11 @@ namespace Exiv2 {
         void setComment(const std::string& comment);
         //@}
 
+        //! @name Accessors
+        //@{
+        std::string mimeType() const { return "image/x-fuji-raf"; }
+        //@}
+
     private:
         //! @name NOT implemented
         //@{
diff --git a/src/tiffimage.hpp b/src/tiffimage.hpp
index 3d08f3c..63b429d 100644
--- a/src/tiffimage.hpp
+++ b/src/tiffimage.hpp
@@ -100,6 +100,11 @@ namespace Exiv2 {
         void setComment(const std::string& comment);
         //@}
 
+        //! @name Accessors
+        //@{
+        std::string mimeType() const { return "image/tiff"; }
+        //@}
+
     private:
         //! @name NOT Implemented
         //@{

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list