From 27be5b81471a1be32c3e00e1cceef10f1d6bb701 Mon Sep 17 00:00:00 2001 From: Andreas Huggel Date: Fri, 13 Feb 2004 02:59:37 +0000 Subject: [PATCH] More testing... --- src/exiftest.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/exiftest.cpp b/src/exiftest.cpp index cf4035d7..33bd46d0 100644 --- a/src/exiftest.cpp +++ b/src/exiftest.cpp @@ -3,11 +3,11 @@ Abstract : This is playground code, do what you want with it. Author(s): Andreas Huggel (ahu) - Version : $Name: $ $Revision: 1.15 $ + Version : $Name: $ $Revision: 1.16 $ */ // ***************************************************************************** #include "rcsid.hpp" -EXIV2_RCSID("@(#) $Name: $ $Revision: 1.15 $ $RCSfile: exiftest.cpp,v $") +EXIV2_RCSID("@(#) $Name: $ $Revision: 1.16 $ $RCSfile: exiftest.cpp,v $") // ***************************************************************************** // included header files @@ -45,11 +45,21 @@ try { exifPrint(exifData); exifData.writeThumbnail("thumb"); - std::string key = "Image.OtherTags.Copyright"; + std::string key = "Image.UserInfo.UserComment"; + Value* value = Value::create(undefined); + value->read("ASCII\0\0\0Chan Yee Send", 21, bigEndian); + exifData.add(key, value); + delete value; + key = "Image.OtherTags.Copyright"; + value = Value::create(asciiString); + value->read(std::string("Photographer\0", 13)); +// value->read(std::string(" \0Editor\0", 9)); +// value->read(std::string("Photographer\0Editor\0", 20)); + std::cout << "value size is (20) " << value->size() << "\n"; + std::cout << "value is " << *value << "\n"; - Value* value = Value::create(asciiString); - value->read("Chan Yee Send"); exifData.add(key, value); + delete value; char* buf = new char[1024*128];