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

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:37:34 UTC 2017


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

The following commit has been merged in the master branch:
commit 073cf8af57efc6b1432885e7b2a7489eef24e908
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Sat May 6 16:11:25 2006 +0000

    Added basic Minolta makernote support (Gilles Caulier)
---
 src/Makefile                      |   1 +
 src/minoltamn.cpp                 | 121 ++++++++++++++++++++++++++++++++++++++
 src/{sonymn.hpp => minoltamn.hpp} |  56 ++++++++----------
 src/mn.hpp                        |   1 +
 src/tags.cpp                      |   1 +
 src/types.hpp                     |   2 +-
 6 files changed, 150 insertions(+), 32 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index 61f479c..f1a3d5d 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -69,6 +69,7 @@ CCSRC = basicio.cpp           \
 	makernote.cpp         \
 	makernote2.cpp        \
 	metadatum.cpp         \
+	minoltamn.cpp         \
 	nikonmn.cpp           \
 	olympusmn.cpp         \
 	panasonicmn.cpp       \
diff --git a/src/minoltamn.cpp b/src/minoltamn.cpp
new file mode 100644
index 0000000..bbfa425
--- /dev/null
+++ b/src/minoltamn.cpp
@@ -0,0 +1,121 @@
+// ***************************************************************** -*- C++ -*-
+/*
+ * Copyright (C) 2006 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:      minoltamn.cpp
+  Version:   $Rev$
+  Author(s): Gilles Caulier (gc) <caulier.gilles at kdemail.net>
+             Andreas Huggel (ahu) <ahuggel at gmx.net>
+  History:   06-May-06, gc: submitted
+  Credits:   See header file.
+ */
+
+// *****************************************************************************
+#include "rcsid.hpp"
+EXIV2_RCSID("@(#) $Id$");
+
+// *****************************************************************************
+// included header files
+#include "types.hpp"
+#include "minoltamn.hpp"
+#include "makernote.hpp"
+#include "value.hpp"
+
+// + standard includes
+#include <string>
+#include <sstream>
+#include <iomanip>
+#include <cassert>
+
+// *****************************************************************************
+// class member definitions
+namespace Exiv2 {
+
+    //! @cond IGNORE
+    MinoltaMakerNote::RegisterMn::RegisterMn()
+    {
+        MakerNoteFactory::registerMakerNote(
+            "KONICA MINOLTA*", "*", createMinoltaMakerNote);
+        MakerNoteFactory::registerMakerNote(
+            minoltaIfdId, MakerNote::AutoPtr(new MinoltaMakerNote));
+
+        ExifTags::registerMakerTagInfo(minoltaIfdId, tagInfo_);
+    }
+    //! @endcond
+
+    // Minolta Tag Info
+    const TagInfo MinoltaMakerNote::tagInfo_[] = {
+        TagInfo(0x0000, "Version", "Makernote Version", "String 'MLT0' (not null terminated)", minoltaIfdId, makerTags, undefined, printValue),
+        TagInfo(0x0001, "CameraSettingsOld", "Camera Settings (Old)", "Camera settings (old)", minoltaIfdId, makerTags, undefined, printValue),
+        TagInfo(0x0003, "CameraSettingsNew", "Camera Settings (New)", "Camera settings (old)", minoltaIfdId, makerTags, undefined, printValue),
+        TagInfo(0x0040, "CompressedImageSize", "Compressed Image Size", "Compressed image size", minoltaIfdId, makerTags, unsignedLong, printValue),
+        TagInfo(0x0081, "Thumbnail", "Thumbnail", "Jpeg thumbnail 640x480 pixels", minoltaIfdId, makerTags, undefined, printValue),
+        TagInfo(0x0088, "ThumbnailOffset", "Thumbnail Offset", "Offset of the thumbnail", minoltaIfdId, makerTags, unsignedLong, printValue),
+        TagInfo(0x0089, "ThumbnailLength", "Thumbnail Length", "Size of the thumbnail", minoltaIfdId, makerTags, unsignedLong, printValue),
+        TagInfo(0x0101, "ColorMode", "Color Mode", "Color mode", minoltaIfdId, makerTags, unsignedLong, printValue),
+        TagInfo(0x0102, "ImageQuality", "Image Quality", "Image quality", minoltaIfdId, makerTags, unsignedLong, printValue),
+        TagInfo(0x0e00, "PIM_IFD", "PIM IFD", "PIM information", minoltaIfdId, makerTags, undefined, printValue),
+        // End of list marker
+        TagInfo(0xffff, "(UnknownMinoltaMakerNoteTag)", "(UnknownMinoltaMakerNoteTag)", "Unknown MinoltaMakerNote tag", minoltaIfdId, makerTags, invalidTypeId, printValue)
+    };
+
+    MinoltaMakerNote::MinoltaMakerNote(bool alloc)
+        : IfdMakerNote(minoltaIfdId, alloc)
+    {
+    }
+
+    MinoltaMakerNote::MinoltaMakerNote(const MinoltaMakerNote& rhs)
+        : IfdMakerNote(rhs)
+    {
+    }
+
+    MinoltaMakerNote::AutoPtr MinoltaMakerNote::create(bool alloc) const
+    {
+        return AutoPtr(create_(alloc));
+    }
+
+    MinoltaMakerNote* MinoltaMakerNote::create_(bool alloc) const
+    {
+        return new MinoltaMakerNote(alloc);
+    }
+
+    MinoltaMakerNote::AutoPtr MinoltaMakerNote::clone() const
+    {
+        return AutoPtr(clone_());
+    }
+
+    MinoltaMakerNote* MinoltaMakerNote::clone_() const
+    {
+        return new MinoltaMakerNote(*this);
+    }
+
+// *****************************************************************************
+// free functions
+
+    MakerNote::AutoPtr createMinoltaMakerNote(bool alloc,
+                                              const byte* /*buf*/,
+                                              long /*len*/,
+                                              ByteOrder /*byteOrder*/,
+                                              long /*offset*/)
+    {
+        return MakerNote::AutoPtr(new MinoltaMakerNote(alloc));
+    }
+
+}                                       // namespace Exiv2
diff --git a/src/sonymn.hpp b/src/minoltamn.hpp
similarity index 74%
copy from src/sonymn.hpp
copy to src/minoltamn.hpp
index b31cd86..5dcbf32 100644
--- a/src/sonymn.hpp
+++ b/src/minoltamn.hpp
@@ -1,6 +1,6 @@
 // ***************************************************************** -*- C++ -*-
 /*
- * Copyright (C) 2005, 2006 Andreas Huggel <ahuggel at gmx.net>
+ * Copyright (C) 2006 Andreas Huggel <ahuggel at gmx.net>
  *
  * This program is part of the Exiv2 distribution.
  *
@@ -19,15 +19,17 @@
  * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
  */
 /*!
-  @file    sonymn.hpp
-  @brief   Basic Sony MakerNote implementation
+  @file    minoltamn.hpp
+  @brief   Minolta MakerNote
   @version $Rev$
   @author  Andreas Huggel (ahu)
            <a href="mailto:ahuggel at gmx.net">ahuggel at gmx.net</a>
-  @date    18-Apr-05, ahu: created
+  @author  Gilles Caulier (gc)
+           <a href="mailto:caulier.gilles at kdemail.net">caulier.gilles at kdemail.net</a>
+  @date    06-May-06, gc: submitted
  */
-#ifndef SONYMN_HPP_
-#define SONYMN_HPP_
+#ifndef MINOLTAMN_HPP_
+#define MINOLTAMN_HPP_
 
 // *****************************************************************************
 // included header files
@@ -73,20 +75,20 @@ namespace Exiv2 {
              owns this copy and the auto-pointer ensures that it will be
              deleted.
      */
-    MakerNote::AutoPtr createSonyMakerNote(bool alloc,
-                                            const byte* buf,
-                                            long len,
-                                            ByteOrder byteOrder,
-                                            long offset);
+    MakerNote::AutoPtr createMinoltaMakerNote(bool alloc,
+                                              const byte* buf,
+                                              long len,
+                                              ByteOrder byteOrder,
+                                              long offset);
 
 // *****************************************************************************
 // class definitions
 
-    //! MakerNote for Sony cameras
-    class SonyMakerNote : public IfdMakerNote {
+    //! MakerNote for Minolta cameras
+    class MinoltaMakerNote : public IfdMakerNote {
     public:
-        //! Shortcut for a %SonyMakerNote auto pointer.
-        typedef std::auto_ptr<SonyMakerNote> AutoPtr;
+        //! Shortcut for a %MinoltaMakerNote auto pointer.
+        typedef std::auto_ptr<MinoltaMakerNote> AutoPtr;
 
         //! @name Creators
         //@{
@@ -94,23 +96,15 @@ namespace Exiv2 {
           @brief Constructor. Allows to choose whether or not memory management
                  is required for the makernote entries.
          */
-        SonyMakerNote(bool alloc =true);
+        MinoltaMakerNote(bool alloc =true);
         //! Copy constructor
-        SonyMakerNote(const SonyMakerNote& rhs);
+        MinoltaMakerNote(const MinoltaMakerNote& rhs);
         //! Virtual destructor
-        virtual ~SonyMakerNote() {}
-        //@}
-
-        //! @name Manipulators
-        //@{
-        int readHeader(const byte* buf,
-                       long len,
-                       ByteOrder byteOrder);
+        virtual ~MinoltaMakerNote() {}
         //@}
 
         //! @name Accessors
         //@{
-        int checkHeader() const;
         AutoPtr create(bool alloc =true) const;
         AutoPtr clone() const;
         //@}
@@ -124,16 +118,16 @@ namespace Exiv2 {
 
     private:
         //! Internal virtual create function.
-        SonyMakerNote* create_(bool alloc =true) const;
+        MinoltaMakerNote* create_(bool alloc =true) const;
         //! Internal virtual copy constructor.
-        SonyMakerNote* clone_() const;
+        MinoltaMakerNote* clone_() const;
 
         //! Tag information
         static const TagInfo tagInfo_[];
 
-    }; // class SonyMakerNote
+    }; // class MinoltaMakerNote
 
-    static SonyMakerNote::RegisterMn registerSonyMakerNote;
+    static MinoltaMakerNote::RegisterMn registerMinoltaMakerNote;
 }                                       // namespace Exiv2
 
-#endif                                  // #ifndef SONYMN_HPP_
+#endif                                  // #ifndef MINOLTAMN_HPP_
diff --git a/src/mn.hpp b/src/mn.hpp
index 8ff60f7..0783e1a 100644
--- a/src/mn.hpp
+++ b/src/mn.hpp
@@ -34,6 +34,7 @@
 // included header files
 #include "canonmn.hpp"
 #include "fujimn.hpp"
+#include "minoltamn.hpp"
 #include "nikonmn.hpp"
 #include "olympusmn.hpp"
 #include "panasonicmn.hpp"
diff --git a/src/tags.cpp b/src/tags.cpp
index d117142..0defd66 100644
--- a/src/tags.cpp
+++ b/src/tags.cpp
@@ -70,6 +70,7 @@ namespace Exiv2 {
         IfdInfo(canonCs2IfdId, "Makernote", "CanonCs2"),
         IfdInfo(canonCfIfdId, "Makernote", "CanonCf"),
         IfdInfo(fujiIfdId, "Makernote", "Fujifilm"),
+        IfdInfo(minoltaIfdId, "Makernote", "Minolta"),
         IfdInfo(nikon1IfdId, "Makernote", "Nikon1"),
         IfdInfo(nikon2IfdId, "Makernote", "Nikon2"),
         IfdInfo(nikon3IfdId, "Makernote", "Nikon3"),
diff --git a/src/types.hpp b/src/types.hpp
index 272e0b1..836b80c 100644
--- a/src/types.hpp
+++ b/src/types.hpp
@@ -97,7 +97,7 @@ namespace Exiv2 {
     enum IfdId { ifdIdNotSet,
                  ifd0Id, exifIfdId, gpsIfdId, iopIfdId, ifd1Id,
                  canonIfdId, canonCs1IfdId, canonCs2IfdId, canonCfIfdId,
-                 fujiIfdId, nikon1IfdId, nikon2IfdId, nikon3IfdId,
+                 fujiIfdId, minoltaIfdId, nikon1IfdId, nikon2IfdId, nikon3IfdId,
                  olympusIfdId, panasonicIfdId, sigmaIfdId, sonyIfdId,
                  lastIfdId };
 

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list