[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:42:51 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=d542872
The following commit has been merged in the master branch:
commit d5428722284931689122c8b16e77ad8374897a86
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Mon Dec 26 17:12:55 2011 +0000
Added SamsungPictureWizard group with a decoding table for the Mode tag from Pascal de Bruijn.
---
doc/templates/Makefile | 1 +
doc/templates/tags-samsung.html.in | 9 ++++++-
src/samsungmn.cpp | 54 +++++++++++++++++++++++++++++---------
src/samsungmn_int.hpp | 4 +++
src/tags.cpp | 1 +
src/tags_int.hpp | 1 +
src/tiffimage.cpp | 25 ++++++++++++++++++
7 files changed, 81 insertions(+), 14 deletions(-)
diff --git a/doc/templates/Makefile b/doc/templates/Makefile
index a0018ab..4808cb0 100644
--- a/doc/templates/Makefile
+++ b/doc/templates/Makefile
@@ -100,6 +100,7 @@ TABLES = Exif \
PanasonicRaw \
Pentax \
Samsung2 \
+ SamsungPictureWizard \
Sigma \
Sony1 \
SonyMinolta \
diff --git a/doc/templates/tags-samsung.html.in b/doc/templates/tags-samsung.html.in
index 183171d..11a86f1 100644
--- a/doc/templates/tags-samsung.html.in
+++ b/doc/templates/tags-samsung.html.in
@@ -8,10 +8,17 @@ __index1__
__index2__
<h2>Samsung MakerNote Tags defined in Exiv2</h2>
<div>
-<p>Tags found in the MakerNote of images taken with Samsung cameras.</a>.</p>
+<p>Tags found in the MakerNote of images taken with Samsung cameras.</p>
<p>Click on a column header to sort the table.</p>
</div>
__Samsung2__
+<br>
+
+<h3>Samsung Picture Wizard Tags</h3>
+<p>Click on a column header to sort the table.</p>
+__SamsungPictureWizard__
+<br>
+
</div>
<!-- closes content -->
diff --git a/src/samsungmn.cpp b/src/samsungmn.cpp
index 50dc090..4926464 100644
--- a/src/samsungmn.cpp
+++ b/src/samsungmn.cpp
@@ -72,18 +72,6 @@ namespace Exiv2 {
{ 1, N_("On") }
};
- std::ostream& printPictureWizard(std::ostream& os, const Value& value, const ExifData*)
- {
- if (value.count() != 5 || value.typeId() != unsignedShort) {
- return os << value;
- }
- return os << "Mode: " << value.toLong(0)
- << ", Col: " << value.toLong(1)
- << ", Sat: " << value.toLong(2) - 4
- << ", Sha: " << value.toLong(3) - 4
- << ", Con: " << value.toLong(4) - 4;
- }
-
std::ostream& printCameraTemperature(std::ostream& os, const Value& value, const ExifData*)
{
if (value.count() != 1 || value.typeId() != signedRational) {
@@ -113,7 +101,7 @@ namespace Exiv2 {
// Samsung MakerNote Tag Info
const TagInfo Samsung2MakerNote::tagInfo_[] = {
TagInfo(0x0001, "Version", N_("Version"), N_("Makernote version"), samsung2Id, makerTags, undefined, -1, printExifVersion),
- TagInfo(0x0021, "PictureWizard", N_("Picture Wizard"), N_("Picture wizard"), samsung2Id, makerTags, unsignedShort, -1, printPictureWizard),
+ TagInfo(0x0021, "PictureWizard", N_("Picture Wizard"), N_("Picture wizard composite tag"), samsung2Id, makerTags, unsignedShort, -1, printValue),
TagInfo(0x0030, "LocalLocationName", N_("Local Location Name"), N_("Local location name"), samsung2Id, makerTags, asciiString, -1, printValue),
TagInfo(0x0031, "LocationName", N_("Location Name"), N_("Location name"), samsung2Id, makerTags, asciiString, -1, printValue),
TagInfo(0x0035, "Preview", N_("Pointer to a preview image"), N_("Offset to an IFD containing a preview image"), samsung2Id, makerTags, unsignedLong, -1, printValue),
@@ -151,4 +139,44 @@ namespace Exiv2 {
return tagInfo_;
}
+ //! PictureWizard Mode
+ extern const TagDetails samsungPwMode[] = {
+ { 0, N_("Standard") },
+ { 1, N_("Vivid") },
+ { 2, N_("Portrait") },
+ { 3, N_("Landscape") },
+ { 4, N_("Forest") },
+ { 5, N_("Retro") },
+ { 6, N_("Cool") },
+ { 7, N_("Calm") },
+ { 8, N_("Classic") },
+ { 9, N_("Custom1") },
+ { 10, N_("Custom2") },
+ { 11, N_("Custom3") }
+ };
+
+ std::ostream& printValueMinus4(std::ostream& os, const Value& value, const ExifData*)
+ {
+ if (value.count() != 1 || value.typeId() != unsignedShort) {
+ return os << value;
+ }
+ return os << value.toLong(0) - 4;
+ }
+
+ // Samsung PictureWizard Tag Info
+ const TagInfo Samsung2MakerNote::tagInfoPw_[] = {
+ TagInfo(0x0000, "Mode", N_("Mode"), N_("Mode"), samsungPwId, makerTags, unsignedShort, 1, EXV_PRINT_TAG(samsungPwMode)),
+ TagInfo(0x0001, "Color", N_("Color"), N_("Color"), samsungPwId, makerTags, unsignedShort, 1, printValue),
+ TagInfo(0x0002, "Saturation", N_("Saturation"), N_("Saturation"), samsungPwId, makerTags, unsignedShort, 1, printValueMinus4),
+ TagInfo(0x0003, "Sharpness", N_("Sharpness"), N_("Sharpness"), samsungPwId, makerTags, unsignedShort, 1, printValueMinus4),
+ TagInfo(0x0004, "Contrast", N_("Contrast"), N_("Contrast"), samsungPwId, makerTags, unsignedShort, 1, printValueMinus4),
+ // End of list marker
+ TagInfo(0xffff, "(UnknownSamsungPictureWizardTag)", "(UnknownSamsungPictureWizardTag)", N_("Unknown SamsungPictureWizard tag"), samsungPwId, makerTags, unsignedShort, 1, printValue)
+ };
+
+ const TagInfo* Samsung2MakerNote::tagListPw()
+ {
+ return tagInfoPw_;
+ }
+
}} // namespace Internal, Exiv2
diff --git a/src/samsungmn_int.hpp b/src/samsungmn_int.hpp
index 9f3ab3f..66c8b89 100644
--- a/src/samsungmn_int.hpp
+++ b/src/samsungmn_int.hpp
@@ -53,10 +53,14 @@ namespace Exiv2 {
public:
//! Return read-only list of built-in Samsung tags
static const TagInfo* tagList();
+ //! Return read-only list of built-in PictureWizard tags
+ static const TagInfo* tagListPw();
private:
//! Tag information
static const TagInfo tagInfo_[];
+ //! PictureWizard tag information
+ static const TagInfo tagInfoPw_[];
}; // class Samsung2MakerNote
diff --git a/src/tags.cpp b/src/tags.cpp
index af3bf9d..4f33753 100644
--- a/src/tags.cpp
+++ b/src/tags.cpp
@@ -163,6 +163,7 @@ namespace Exiv2 {
{ pentaxId, "Makernote", "Pentax", PentaxMakerNote::tagList },
{ samsung2Id, "Makernote", "Samsung2", Samsung2MakerNote::tagList },
{ samsungPvId, "Makernote", "SamsungPreview", ifdTagList },
+ { samsungPwId, "Makernote", "SamsungPictureWizard", Samsung2MakerNote::tagListPw },
{ sigmaId, "Makernote", "Sigma", SigmaMakerNote::tagList },
{ sony1Id, "Makernote", "Sony1", SonyMakerNote::tagList },
{ sony2Id, "Makernote", "Sony2", SonyMakerNote::tagList },
diff --git a/src/tags_int.hpp b/src/tags_int.hpp
index a3ffc2e..e120eb5 100644
--- a/src/tags_int.hpp
+++ b/src/tags_int.hpp
@@ -141,6 +141,7 @@ namespace Exiv2 {
pentaxId,
samsung2Id,
samsungPvId,
+ samsungPwId,
sigmaId,
sony1Id,
sony2Id,
diff --git a/src/tiffimage.cpp b/src/tiffimage.cpp
index d588a1f..354bfb9 100644
--- a/src/tiffimage.cpp
+++ b/src/tiffimage.cpp
@@ -1117,6 +1117,26 @@ namespace Exiv2 {
{ 190, ttSignedShort, 1 } // Exif.Sony1MltCsA100.ColorCompensationFilter2
};
+ //! Samsung PictureWizard binary array - configuration
+ extern const ArrayCfg samsungPwCfg = {
+ samsungPwId, // Group for the elements
+ invalidByteOrder, // Use byte order from parent
+ ttUnsignedShort, // Type for array entry
+ notEncrypted, // Not encrypted
+ false, // No size element
+ true, // Write all tags
+ true, // Concatenate gaps
+ { 0, ttUnsignedShort, 1 }
+ };
+ //! Samsung PictureWizard binary array - definition
+ extern const ArrayDef samsungPwDef[] = {
+ { 0, ttUnsignedShort, 1 }, // Mode
+ { 2, ttUnsignedShort, 1 }, // Color
+ { 4, ttUnsignedShort, 1 }, // Saturation
+ { 6, ttUnsignedShort, 1 }, // Sharpness
+ { 8, ttUnsignedShort, 1 } // Contrast
+ };
+
/*
This table lists for each group in a tree, its parent group and tag.
Root identifies the root of a TIFF tree, as there is a need for multiple
@@ -1208,6 +1228,7 @@ namespace Exiv2 {
{ Tag::root, panasonicId, exifId, 0x927c },
{ Tag::root, pentaxId, exifId, 0x927c },
{ Tag::root, samsung2Id, exifId, 0x927c },
+ { Tag::root, samsungPwId, samsung2Id, 0x0021 },
{ Tag::root, samsungPvId, samsung2Id, 0x0035 },
{ Tag::root, sigmaId, exifId, 0x927c },
{ Tag::root, sony1Id, exifId, 0x927c },
@@ -1608,10 +1629,14 @@ namespace Exiv2 {
{ Tag::all, pentaxId, newTiffEntry },
// Samsung2 makernote
+ { 0x0021, samsung2Id, EXV_BINARY_ARRAY(samsungPwCfg, samsungPwDef) },
{ 0x0035, samsung2Id, newTiffSubIfd<samsungPvId> },
{ Tag::next, samsung2Id, newTiffDirectory<ignoreId> },
{ Tag::all, samsung2Id, newTiffEntry },
+ // Samsung PictureWizard binary array
+ { Tag::all, samsungPwId, newTiffBinaryElement },
+
// Samsung2 makernote preview subdir
{ 0x0201, samsungPvId, newTiffThumbData<0x0202, samsungPvId> },
{ 0x0202, samsungPvId, newTiffThumbSize<0x0201, samsungPvId> },
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list