[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:54 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=4238255
The following commit has been merged in the master branch:
commit 423825593c5e6af2a8a702f5460e46d4d37f83a2
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Sun Jan 16 13:48:52 2005 +0000
Added CommentValue
---
src/cmd.txt | 2 +
src/exifcomment.cpp | 56 +++++++++-----------------
src/types.cpp | 1 +
src/types.hpp | 3 +-
src/value.cpp | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++
src/value.hpp | 103 +++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 238 insertions(+), 39 deletions(-)
diff --git a/src/cmd.txt b/src/cmd.txt
index c964d5b..9e4c63a 100644
--- a/src/cmd.txt
+++ b/src/cmd.txt
@@ -28,3 +28,5 @@ add Exif.Image.WhitePoint Short 32 12 4 5 6
set Exif.Image.DateTime Ascii "Zwanzig nach fuenf"
set Exif.Image.Artist Ascii nobody
set Exif.Image.Artist "Vincent van Gogh"
+
+set Exif.Photo.UserComment Comment "charset=Ascii This is an ASCII Exif comment"
diff --git a/src/exifcomment.cpp b/src/exifcomment.cpp
index a3562ac..51a94d4 100644
--- a/src/exifcomment.cpp
+++ b/src/exifcomment.cpp
@@ -1,11 +1,13 @@
// ***************************************************************** -*- C++ -*-
/*
- Abstract : Sample program showing how to set the Exif comment of an image
+ Abstract : Sample program showing how to set the Exif comment of an image,
+ Exif.Photo.UserComment
File: exifcomment.cpp
Version : $Rev$
Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
History : 10-May-04, ahu: created
+ 16-Jan-05, ahu: updated using CommentValue and operator trickery
*/
// *****************************************************************************
// included header files
@@ -42,49 +44,27 @@ try {
Exiv2::ExifData &exifData = image->exifData();
/*
- There are two pitfalls that we need to consider when setting the Exif user
- comment (Exif.Photo.UserComment) of an image:
+ Use Exiv2::CommentValue for Exif user comments. The format of the comment
+ string includes an optional charset specification at the beginning:
- First, the type of the Exif user comment tag is "undefined" (and not
- ASCII) according to the Exif standard. This means that in Exiv2, we have
- to deal with a DataValue (and not an AsciiValue). DataValue has the usual
- two read methods, however, the one taking a const std::string& buf expects
- the string to contain a series of integers (e.g., "0 1 2") and not a text
- string. Thus, we need to use the read function that reads the value from a
- character buffer of a given length.
+ [charset=["]Ascii|Jis|Unicode|Undefined["] ]comment
- Second, the Exif comment field starts with an eight character area that
- identifies the used character set. For ASCII, these eight characters are
- "ASCII
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list