Added support for Canon Camera settings 1/2 and Custom Functions tags

This commit is contained in:
Andreas Huggel 2005-04-10 04:06:05 +00:00
parent 92a162606c
commit 6a675f3d82
15 changed files with 1034 additions and 405 deletions

View File

@ -257,13 +257,7 @@ namespace Action {
// Todo: Flash bias, flash energy
// Todo: Implement this for other cameras
std::cout << std::setw(align_) << std::setfill(' ') << std::left
<< "Flash bias" << ": ";
md = exifData.findKey(Exiv2::ExifKey("Exif.Canon.CameraSettings2"));
if (md != exifData.end() && md->count() >= 15) {
Exiv2::CanonMakerNote::print0x0004_15(std::cout, md->toLong(15));
}
std::cout << std::endl;
printTag(exifData, "Exif.CanonCs2.FlashBias", "Flash bias");
// Actual focal length and 35 mm equivalent
// Todo: Calculate 35 mm equivalent a la jhead
@ -281,12 +275,12 @@ namespace Action {
// Subject distance
std::cout << std::setw(align_) << std::setfill(' ') << std::left
<< "Subject distance" << ": ";
if (0 == printTag(exifData, "Exif.Photo.SubjectDistance")) {
md = exifData.findKey(
Exiv2::ExifKey("Exif.Canon.CameraSettings2"));
if (md != exifData.end() && md->count() >= 19) {
Exiv2::CanonMakerNote::print0x0004_19(std::cout, md->toLong(19));
}
bool done = false;
if (!done) {
done = 0 != printTag(exifData, "Exif.Photo.SubjectDistance");
}
if (!done) {
done = 0 != printTag(exifData, "Exif.CanonCs2.SubjectDistance");
}
std::cout << std::endl;
@ -294,23 +288,21 @@ namespace Action {
// from ISOSpeedRatings or the Makernote
std::cout << std::setw(align_) << std::setfill(' ') << std::left
<< "ISO speed" << ": ";
bool done = false;
if (0 == printTag(exifData, "Exif.Photo.ISOSpeedRatings")) {
md = exifData.findKey(
Exiv2::ExifKey("Exif.Canon.CameraSettings1"));
if (md != exifData.end() && md->count() >= 16) {
Exiv2::CanonMakerNote::print0x0001_16(std::cout, md->toLong(16));
done = true;
}
if (!done) {
done = 0 != printTag(exifData, "Exif.Nikon1.ISOSpeed");
}
if (!done) {
done = 0 != printTag(exifData, "Exif.Nikon2.ISOSpeed");
}
if (!done) {
done = 0 != printTag(exifData, "Exif.Nikon3.ISOSpeed");
}
done = false;
if (!done) {
done = 0 != printTag(exifData, "Exif.Photo.ISOSpeedRatings");
}
if (!done) {
done = 0 != printTag(exifData, "Exif.CanonCs1.ISOSpeed");
}
if (!done) {
done = 0 != printTag(exifData, "Exif.Nikon1.ISOSpeed");
}
if (!done) {
done = 0 != printTag(exifData, "Exif.Nikon2.ISOSpeed");
}
if (!done) {
done = 0 != printTag(exifData, "Exif.Nikon3.ISOSpeed");
}
std::cout << std::endl;
@ -318,12 +310,12 @@ namespace Action {
// From ExposureProgram or Canon Makernote
std::cout << std::setw(align_) << std::setfill(' ') << std::left
<< "Exposure mode" << ": ";
if (0 == printTag(exifData, "Exif.Photo.ExposureProgram")) {
md = exifData.findKey(
Exiv2::ExifKey("Exif.Canon.CameraSettings1"));
if (md != exifData.end() && md->count() >= 20) {
Exiv2::CanonMakerNote::print0x0001_20(std::cout, md->toLong(20));
}
done = false;
if (!done) {
done = 0 != printTag(exifData, "Exif.Photo.ExposureProgram");
}
if (!done) {
done = 0 != printTag(exifData, "Exif.CanonCs1.ExposureProgram");
}
std::cout << std::endl;
@ -335,11 +327,8 @@ namespace Action {
std::cout << std::setw(align_) << std::setfill(' ') << std::left
<< "Macro mode" << ": ";
done = false;
md = exifData.findKey(
Exiv2::ExifKey("Exif.Canon.CameraSettings1"));
if (md != exifData.end() && md->count() >= 1) {
Exiv2::CanonMakerNote::print0x0001_01(std::cout, md->toLong(1));
done = true;
if (!done) {
done = 0 != printTag(exifData, "Exif.CanonCs1.Macro");
}
if (!done) {
done = 0 != printTag(exifData, "Exif.Fujifilm.Macro");
@ -351,10 +340,8 @@ namespace Action {
std::cout << std::setw(align_) << std::setfill(' ') << std::left
<< "Image quality" << ": ";
done = false;
md = exifData.findKey(Exiv2::ExifKey("Exif.Canon.CameraSettings1"));
if (md != exifData.end() && md->count() >= 3) {
Exiv2::CanonMakerNote::print0x0001_03(std::cout, md->toLong(3));
done = true;
if (!done) {
done = 0 != printTag(exifData, "Exif.CanonCs1.Quality");
}
if (!done) {
done = 0 != printTag(exifData, "Exif.Fujifilm.Quality");
@ -392,10 +379,8 @@ namespace Action {
std::cout << std::setw(align_) << std::setfill(' ') << std::left
<< "White balance" << ": ";
done = false;
md = exifData.findKey(Exiv2::ExifKey("Exif.Canon.CameraSettings2"));
if (md != exifData.end() && md->count() >= 7) {
Exiv2::CanonMakerNote::print0x0004_07(std::cout, md->toLong(7));
done = true;
if (!done) {
done = 0 != printTag(exifData, "Exif.CanonCs2.WhiteBalance");
}
if (!done) {
done = 0 != printTag(exifData, "Exif.Fujifilm.WhiteBalance");

View File

@ -38,11 +38,14 @@ EXIV2_RCSID("@(#) $Id$");
#include "canonmn.hpp"
#include "makernote.hpp"
#include "value.hpp"
#include "ifd.hpp"
// + standard includes
#include <string>
#include <sstream>
#include <iomanip>
#include <cassert>
#include <cstring>
// Define DEBUG_MAKERNOTE to output debug information to std::cerr
#undef DEBUG_MAKERNOTE
@ -56,21 +59,324 @@ namespace Exiv2 {
// Canon MakerNote Tag Info
const TagInfo CanonMakerNote::tagInfo_[] = {
TagInfo(0x0000, "0x0000", "Unknown", canonIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0001, "CameraSettings1", "Various camera settings (1)", canonIfdId, makerTags, unsignedShort, print0x0001),
TagInfo(0x0001, "CameraSettings1", "Various camera settings (1)", canonIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0002, "0x0002", "Unknown", canonIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0003, "0x0003", "Unknown", canonIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0004, "CameraSettings2", "Various camera settings (2)", canonIfdId, makerTags, unsignedShort, print0x0004),
TagInfo(0x0004, "CameraSettings2", "Various camera settings (2)", canonIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0006, "ImageType", "Image type", canonIfdId, makerTags, asciiString, printValue),
TagInfo(0x0007, "FirmwareVersion", "Firmware version", canonIfdId, makerTags, asciiString, printValue),
TagInfo(0x0008, "ImageNumber", "Image number", canonIfdId, makerTags, unsignedLong, print0x0008),
TagInfo(0x0009, "OwnerName", "Owner Name", canonIfdId, makerTags, asciiString, printValue),
TagInfo(0x000c, "SerialNumber", "Camera serial number", canonIfdId, makerTags, unsignedLong, print0x000c),
TagInfo(0x000d, "0x000d", "Unknown", canonIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x000f, "EosD30Functions", "EOS D30 Custom Functions", canonIfdId, makerTags, unsignedShort, print0x000f),
TagInfo(0x000f, "CustomFunctions", "Custom Functions", canonIfdId, makerTags, unsignedShort, printValue),
// End of list marker
TagInfo(0xffff, "(UnknownCanonMakerNoteTag)", "Unknown CanonMakerNote tag", canonIfdId, makerTags, invalidTypeId, printValue)
};
// Canon Camera Settings 1 Tag Info
const TagInfo CanonMakerNote::tagInfoCs1_[] = {
TagInfo(0x0001, "Macro", "Macro mode", canonCs1IfdId, makerTags, unsignedShort, printCs10x0001),
TagInfo(0x0002, "Selftimer", "Self timer", canonCs1IfdId, makerTags, unsignedShort, printCs10x0002),
TagInfo(0x0003, "Quality", "Quality", canonCs1IfdId, makerTags, unsignedShort, printCs10x0003),
TagInfo(0x0004, "FlashMode", "Flash mode setting", canonCs1IfdId, makerTags, unsignedShort, printCs10x0004),
TagInfo(0x0005, "DriveMode", "Drive mode setting", canonCs1IfdId, makerTags, unsignedShort, printCs10x0005),
TagInfo(0x0006, "0x0006", "Unknown", canonCs1IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0007, "FocusMode", "Focus mode setting", canonCs1IfdId, makerTags, unsignedShort, printCs10x0007),
TagInfo(0x0008, "0x0008", "Unknown", canonCs1IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0009, "0x0009", "Unknown", canonCs1IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x000a, "ImageSize", "Image size", canonCs1IfdId, makerTags, unsignedShort, printCs10x000a),
TagInfo(0x000b, "EasyMode", "Easy shooting mode", canonCs1IfdId, makerTags, unsignedShort, printCs10x000b),
TagInfo(0x000c, "DigitalZoom", "Digital zoom", canonCs1IfdId, makerTags, unsignedShort, printCs10x000c),
TagInfo(0x000d, "Contrast", "Contrast setting", canonCs1IfdId, makerTags, unsignedShort, printCs1Lnh),
TagInfo(0x000e, "Saturation", "Saturation setting", canonCs1IfdId, makerTags, unsignedShort, printCs1Lnh),
TagInfo(0x000f, "Sharpness", "Sharpness setting", canonCs1IfdId, makerTags, unsignedShort, printCs1Lnh),
TagInfo(0x0010, "ISOSpeed", "ISO speed setting", canonCs1IfdId, makerTags, unsignedShort, printCs10x0010),
TagInfo(0x0011, "MeteringMode", "Metering mode setting", canonCs1IfdId, makerTags, unsignedShort, printCs10x0011),
TagInfo(0x0012, "FocusType", "Focus type setting", canonCs1IfdId, makerTags, unsignedShort, printCs10x0012),
TagInfo(0x0013, "AFPoint", "AF point selected", canonCs1IfdId, makerTags, unsignedShort, printCs10x0013),
TagInfo(0x0014, "ExposureProgram", "Exposure mode setting", canonCs1IfdId, makerTags, unsignedShort, printCs10x0014),
TagInfo(0x0015, "0x0015", "Unknown", canonCs1IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0016, "0x0016", "Unknown", canonCs1IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0017, "Lens", "'long' and 'short' focal length of lens (in 'focal units') and 'focal units' per mm", canonCs1IfdId, makerTags, unsignedShort, printCs1Lens),
TagInfo(0x0018, "0x0018", "Unknown", canonCs1IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0019, "0x0019", "Unknown", canonCs1IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x001a, "0x001a", "Unknown", canonCs1IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x001b, "0x001b", "Unknown", canonCs1IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x001c, "FlashActivity", "Flash activity", canonCs1IfdId, makerTags, unsignedShort, printCs10x001c),
TagInfo(0x001d, "FlashDetails", "Flash details", canonCs1IfdId, makerTags, unsignedShort, printCs10x001d),
TagInfo(0x001e, "0x001e", "Unknown", canonCs1IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x001f, "0x001f", "Unknown", canonCs1IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0020, "FocusMode", "Focus mode setting", canonCs1IfdId, makerTags, unsignedShort, printCs10x0020),
TagInfo(0x0021, "0x0021", "Unknown", canonCs1IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0022, "0x0022", "Unknown", canonCs1IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0023, "0x0023", "Unknown", canonCs1IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0024, "0x0024", "Unknown", canonCs1IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0025, "0x0025", "Unknown", canonCs1IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0026, "0x0026", "Unknown", canonCs1IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0027, "0x0027", "Unknown", canonCs1IfdId, makerTags, unsignedShort, printValue),
// End of list marker
TagInfo(0xffff, "(UnknownCanonCs1Tag)", "Unknown Canon Camera Settings 1 tag", canonCs1IfdId, makerTags, invalidTypeId, printValue)
};
// Canon Camera Settings 2 Tag Info
const TagInfo CanonMakerNote::tagInfoCs2_[] = {
TagInfo(0x0001, "0x0001", "Unknown", canonCs2IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0002, "0x0002", "Unknown", canonCs2IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0003, "0x0003", "Unknown", canonCs2IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0004, "0x0004", "Unknown", canonCs2IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0005, "0x0005", "Unknown", canonCs2IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0006, "0x0006", "Unknown", canonCs2IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0007, "WhiteBalance", "White balance setting", canonCs2IfdId, makerTags, unsignedShort, printCs20x0007),
TagInfo(0x0008, "0x0008", "Unknown", canonCs2IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0009, "Sequence", "Sequence number (if in a continuous burst)", canonCs2IfdId, makerTags, unsignedShort, printCs20x0009),
TagInfo(0x000a, "0x000a", "Unknown", canonCs2IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x000b, "0x000b", "Unknown", canonCs2IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x000c, "0x000c", "Unknown", canonCs2IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x000d, "0x000d", "Unknown", canonCs2IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x000e, "AFPointUsed", "AF point used", canonCs2IfdId, makerTags, unsignedShort, printCs20x000e),
TagInfo(0x000f, "FlashBias", "Flash bias", canonCs2IfdId, makerTags, unsignedShort, printCs20x000f),
TagInfo(0x0010, "0x0010", "Unknown", canonCs2IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0011, "0x0011", "Unknown", canonCs2IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0012, "0x0012", "Unknown", canonCs2IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0013, "SubjectDistance", "Subject distance (units are not clear)", canonCs2IfdId, makerTags, unsignedShort, printCs20x0013),
TagInfo(0x0014, "0x0014", "Unknown", canonCs2IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0015, "0x0015", "Unknown", canonCs2IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0016, "0x0016", "Unknown", canonCs2IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0017, "0x0017", "Unknown", canonCs2IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0018, "0x0018", "Unknown", canonCs2IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0019, "0x0019", "Unknown", canonCs2IfdId, makerTags, unsignedShort, printValue),
TagInfo(0x001a, "0x001a", "Unknown", canonCs2IfdId, makerTags, unsignedShort, printValue),
// End of list marker
TagInfo(0xffff, "(UnknownCanonCs2Tag)", "Unknown Canon Camera Settings 2 tag", canonCs2IfdId, makerTags, invalidTypeId, printValue)
};
// Canon Custom Function Tag Info
const TagInfo CanonMakerNote::tagInfoCf_[] = {
TagInfo(0x0001, "NoiseReduction", "Long exposure noise reduction", canonCfIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0002, "ShutterAeLock", "Shutter/AE lock buttons", canonCfIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0003, "MirrorLockup", "Mirror lockup", canonCfIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0004, "ExposureLevelIncrements", "Tv/Av and exposure level", canonCfIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0005, "AFAssist", "AF assist light", canonCfIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0006, "FlashSyncSpeedAv", "Shutter speed in Av mode", canonCfIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0007, "AEBSequence", "AEB sequence/auto cancellation", canonCfIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0008, "ShutterCurtainSync", "Shutter curtain sync", canonCfIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x0009, "LensAFStopButton", "Lens AF stop button Fn. Switch", canonCfIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x000a, "FillFlashAutoReduction", "Auto reduction of fill flash", canonCfIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x000b, "MenuButtonReturn", "Menu button return position", canonCfIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x000c, "SetButtonFunction", "SET button func. when shooting", canonCfIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x000d, "SensorCleaning", "Sensor cleaning", canonCfIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x000e, "SuperimposedDisplay", "Superimposed display", canonCfIfdId, makerTags, unsignedShort, printValue),
TagInfo(0x000f, "ShutterReleaseNoCFCard", "Shutter Release W/O CF Card", canonCfIfdId, makerTags, unsignedShort, printValue),
// End of list marker
TagInfo(0xffff, "(UnknownCanonCfTag)", "Unknown Canon Custom Function tag", canonCfIfdId, makerTags, invalidTypeId, printValue)
};
int CanonMakerNote::read(const byte* buf,
long len,
ByteOrder byteOrder,
long offset)
{
int rc = IfdMakerNote::read(buf, len, byteOrder, offset);
if (rc) return rc;
// Decode camera settings 1 and add settings as additional entries
Entries::iterator cs = ifd_.findTag(0x0001);
if (cs != ifd_.end() && cs->type() == unsignedShort) {
for (uint16_t c = 1; cs->count() > c; ++c) {
if (c == 23 && cs->count() > 25) {
// Pack related lens info into one tag
addCsEntry(canonCs1IfdId, c, cs->offset() + c*2,
cs->data() + c*2, 3);
c += 2;
}
else {
addCsEntry(canonCs1IfdId, c, cs->offset() + c*2,
cs->data() + c*2, 1);
}
}
// Discard the original entry
ifd_.erase(cs);
}
// Decode camera settings 2 and add settings as additional entries
cs = ifd_.findTag(0x0004);
if (cs != ifd_.end() && cs->type() == unsignedShort) {
for (uint16_t c = 1; cs->count() > c; ++c) {
addCsEntry(canonCs2IfdId, c, cs->offset() + c*2,
cs->data() + c*2, 1);
}
// Discard the original entry
ifd_.erase(cs);
}
// Decode custom functions and add each as an additional entry
cs = ifd_.findTag(0x000f);
if (cs != ifd_.end() && cs->type() == unsignedShort) {
for (uint16_t c = 1; cs->count() > c; ++c) {
addCsEntry(canonCfIfdId, c, cs->offset() + c*2,
cs->data() + c*2, 1);
}
// Discard the original entry
ifd_.erase(cs);
}
// Copy remaining ifd entries
entries_.insert(entries_.begin(), ifd_.begin(), ifd_.end());
// Set idx
int idx = 0;
Entries::iterator e = entries_.end();
for (Entries::iterator i = entries_.begin(); i != e; ++i) {
i->setIdx(++idx);
}
return 0;
}
void CanonMakerNote::addCsEntry(IfdId ifdId,
uint16_t tag,
long offset,
const byte* data,
int count)
{
Entry e(false);
e.setIfdId(ifdId);
e.setTag(tag);
e.setOffset(offset);
e.setValue(unsignedShort, count, data, 2*count);
add(e);
}
void CanonMakerNote::add(const Entry& entry)
{
assert(alloc_ == entry.alloc());
assert( entry.ifdId() == canonIfdId
|| entry.ifdId() == canonCs1IfdId
|| entry.ifdId() == canonCs2IfdId
|| entry.ifdId() == canonCfIfdId);
// allow duplicates
entries_.push_back(entry);
}
long CanonMakerNote::copy(byte* buf, ByteOrder byteOrder, long offset)
{
if (byteOrder_ == invalidByteOrder) byteOrder_ = byteOrder;
assert(ifd_.alloc());
ifd_.clear();
// Add all standard Canon entries to the IFD
Entries::const_iterator end = entries_.end();
for (Entries::const_iterator i = entries_.begin(); i != end; ++i) {
if (i->ifdId() == canonIfdId) {
ifd_.add(*i);
}
}
// Collect camera settings 1 entries and add the original Canon tag
Entry cs1;
if (assemble(cs1, canonCs1IfdId, 0x0001, byteOrder_)) {
ifd_.erase(0x0001);
ifd_.add(cs1);
}
// Collect camera settings 2 entries and add the original Canon tag
Entry cs2;
if (assemble(cs2, canonCs2IfdId, 0x0004, byteOrder_)) {
ifd_.erase(0x0004);
ifd_.add(cs2);
}
// Collect custom function entries and add the original Canon tag
Entry cf;
if (assemble(cf, canonCfIfdId, 0x000f, byteOrder_)) {
ifd_.erase(0x000f);
ifd_.add(cf);
}
return IfdMakerNote::copy(buf, byteOrder_, offset);
} // CanonMakerNote::copy
void CanonMakerNote::updateBase(byte* pNewBase)
{
byte* pBase = ifd_.updateBase(pNewBase);
if (absOffset_ && !alloc_) {
Entries::iterator end = entries_.end();
for (Entries::iterator pos = entries_.begin(); pos != end; ++pos) {
pos->updateBase(pBase, pNewBase);
}
}
} // CanonMakerNote::updateBase
long CanonMakerNote::size() const
{
Ifd ifd(canonIfdId, 0, alloc_); // offset doesn't matter
// Add all standard Canon entries to the IFD
Entries::const_iterator end = entries_.end();
for (Entries::const_iterator i = entries_.begin(); i != end; ++i) {
if (i->ifdId() == canonIfdId) {
ifd.add(*i);
}
}
// Collect camera settings 1 entries and add the original Canon tag
Entry cs1(alloc_);
if (assemble(cs1, canonCs1IfdId, 0x0001, littleEndian)) {
ifd.erase(0x0001);
ifd.add(cs1);
}
// Collect camera settings 2 entries and add the original Canon tag
Entry cs2(alloc_);
if (assemble(cs2, canonCs2IfdId, 0x0004, littleEndian)) {
ifd.erase(0x0004);
ifd.add(cs2);
}
// Collect custom function entries and add the original Canon tag
Entry cf(alloc_);
if (assemble(cf, canonCfIfdId, 0x000f, littleEndian)) {
ifd.erase(0x000f);
ifd.add(cf);
}
return headerSize() + ifd.size() + ifd.dataSize();
} // CanonMakerNote::size
long CanonMakerNote::assemble(Entry& e,
IfdId ifdId,
uint16_t tag,
ByteOrder byteOrder) const
{
DataBuf buf(1024);
memset(buf.pData_, 0x0, 1024);
long len = 0;
Entries::const_iterator end = entries_.end();
for (Entries::const_iterator i = entries_.begin(); i != end; ++i) {
if (i->ifdId() == ifdId) {
long pos = i->tag() * 2;
long size = pos + i->size();
assert(size <= 1024);
memcpy(buf.pData_ + pos, i->data(), i->size());
if (len < size) len = size;
}
}
if (len > 0) {
// Number of shorts in the buffer (rounded up)
uint16_t s = (len+1) / 2;
us2Data(buf.pData_, s*2, byteOrder);
e.setIfdId(canonIfdId);
e.setIdx(0); // don't care
e.setTag(tag);
e.setOffset(0); // will be calculated when the IFD is written
e.setValue(unsignedShort, s, buf.pData_, s*2);
}
return len;
} // CanonMakerNote::assemble
Entries::const_iterator CanonMakerNote::findIdx(int idx) const
{
return std::find_if(entries_.begin(), entries_.end(),
FindEntryByIdx(idx));
}
CanonMakerNote::CanonMakerNote(bool alloc)
: IfdMakerNote(canonIfdId, alloc)
{
@ -79,6 +385,7 @@ namespace Exiv2 {
CanonMakerNote::CanonMakerNote(const CanonMakerNote& rhs)
: IfdMakerNote(rhs)
{
entries_ = rhs.entries_;
}
CanonMakerNote::AutoPtr CanonMakerNote::create(bool alloc) const
@ -101,187 +408,6 @@ namespace Exiv2 {
return new CanonMakerNote(*this);
}
std::ostream& CanonMakerNote::print0x0001(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) {
return os << value;
}
long count = value.count();
if (count < 2) return os;
long l = value.toLong(1);
os << std::setw(30) << "\n Macro mode ";
print0x0001_01(os, l);
if (count < 3) return os;
l = value.toLong(2);
os << std::setw(30) << "\n Self timer ";
print0x0001_02(os, l);
if (count < 4) return os;
l = value.toLong(3);
os << std::setw(30) << "\n Quality ";
print0x0001_03(os, l);
if (count < 5) return os;
l = value.toLong(4);
os << std::setw(30) << "\n Flash mode ";
print0x0001_04(os, l);
if (count < 6) return os;
l = value.toLong(5);
os << std::setw(30) << "\n Drive mode ";
print0x0001_05(os, l);
// Meaning of the 6th ushort is unknown - ignore it
if (count < 8) return os;
l = value.toLong(7);
os << std::setw(30) << "\n Focus mode ";
print0x0001_07(os, l);
// Meaning of the 8th ushort is unknown - ignore it
// Meaning of the 9th ushort is unknown - ignore it
if (count < 11) return os;
l = value.toLong(10);
os << std::setw(30) << "\n Image size ";
print0x0001_10(os, l);
if (count < 12) return os;
l = value.toLong(11);
os << std::setw(30) << "\n Easy shooting mode ";
print0x0001_11(os, l);
if (count < 13) return os;
l = value.toLong(12);
os << std::setw(30) << "\n Digital zoom ";
print0x0001_12(os, l);
if (count < 14) return os;
l = value.toLong(13);
os << std::setw(30) << "\n Contrast ";
print0x0001_lnh(os, l);
if (count < 15) return os;
l = value.toLong(14);
os << std::setw(30) << "\n Saturation ";
print0x0001_lnh(os, l);
if (count < 16) return os;
l = value.toLong(15);
os << std::setw(30) << "\n Sharpness ";
print0x0001_lnh(os, l);
if (count < 17) return os;
l = value.toLong(16);
if (l != 0) {
os << std::setw(30) << "\n ISO ";
print0x0001_16(os, l);
}
if (count < 18) return os;
l = value.toLong(17);
os << std::setw(30) << "\n Metering mode ";
print0x0001_17(os, l);
if (count < 19) return os;
l = value.toLong(18);
os << std::setw(30) << "\n Focus type ";
print0x0001_18(os, l);
if (count < 20) return os;
l = value.toLong(19);
os << std::setw(30) << "\n AF point selected ";
print0x0001_19(os, l);
if (count < 21) return os;
l = value.toLong(20);
os << std::setw(30) << "\n Exposure mode ";
print0x0001_20(os, l);
// Meaning of the 21st ushort is unknown - ignore it
// Meaning of the 22nd ushort is unknown - ignore it
if (count < 26) return os;
os << std::setw(30) << "\n Lens ";
print0x0001_Lens(os, value);
// Meaning of the 26th ushort is unknown - ignore it
// Meaning of the 27th ushort is unknown - ignore it
if (count < 29) return os;
l = value.toLong(28);
os << std::setw(30) << "\n Flash activity ";
print0x0001_28(os, l);
if (count < 30) return os;
l = value.toLong(29);
if (l > 0) {
os << std::setw(30) << "\n Flash details ";
print0x0001_29(os, l);
}
// Meaning of the 30th ushort is unknown - ignore it
// Meaning of the 31st ushort is unknown - ignore it
if (count < 33) return os;
l = value.toLong(32);
os << std::setw(30) << "\n Focus mode ";
print0x0001_32(os, l);
// Meaning of any further ushorts is unknown - ignore them
return os;
} // CanonMakerNote::print0x0001
std::ostream& CanonMakerNote::print0x0004(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) {
return os << value;
}
long count = value.count();
// Meaning of ushorts 1-6 is unknown - ignore them
if (count < 8) return os;
long l = value.toLong(7);
os << std::setw(30) << "\n White balance ";
print0x0004_07(os, l);
// Meaning of ushort 8 is unknown - ignore it
if (count < 10) return os;
l = value.toLong(9);
os << std::setw(30) << "\n Sequence number ";
print0x0004_09(os, l);
// Meaning of ushorts 10-13 is unknown - ignore them
if (count < 15) return os;
l = value.toLong(14);
os << std::setw(30) << "\n AF point used ";
print0x0004_14(os, l);
if (count < 16) return os;
l = value.toLong(15);
os << std::setw(30) << "\n Flash bias ";
print0x0004_15(os, l);
// Meaning of ushorts 16-18 is unknown - ignore them
if (count < 20) return os;
l = value.toLong(19);
os << std::setw(30) << "\n Subject distance (0.01m or 0.001m) ";
print0x0004_19(os, l);
return os;
} // CanonMakerNote::print0x0004
std::ostream& CanonMakerNote::print0x0008(std::ostream& os,
const Value& value)
{
@ -302,16 +428,11 @@ namespace Exiv2 {
<< (l & 0x0000ffff);
}
std::ostream& CanonMakerNote::print0x000f(std::ostream& os,
const Value& value)
{
// Todo: Decode EOS D30 Custom Functions
return os << "EOS D30 Custom Functions "
<< value << " (Todo: decode this field)";
}
std::ostream& CanonMakerNote::print0x0001_01(std::ostream& os, long l)
std::ostream& CanonMakerNote::printCs10x0001(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) return os << value;
long l = value.toLong();
switch (l) {
case 1: os << "On"; break;
case 2: os << "Off"; break;
@ -320,8 +441,11 @@ namespace Exiv2 {
return os;
}
std::ostream& CanonMakerNote::print0x0001_02(std::ostream& os, long l)
std::ostream& CanonMakerNote::printCs10x0002(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) return os << value;
long l = value.toLong();
if (l == 0) {
os << "Off";
}
@ -331,8 +455,11 @@ namespace Exiv2 {
return os;
}
std::ostream& CanonMakerNote::print0x0001_03(std::ostream& os, long l)
std::ostream& CanonMakerNote::printCs10x0003(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) return os << value;
long l = value.toLong();
switch (l) {
case 2: os << "Normal"; break;
case 3: os << "Fine"; break;
@ -342,8 +469,11 @@ namespace Exiv2 {
return os;
}
std::ostream& CanonMakerNote::print0x0001_04(std::ostream& os, long l)
std::ostream& CanonMakerNote::printCs10x0004(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) return os << value;
long l = value.toLong();
switch (l) {
case 0: os << "Off"; break;
case 1: os << "Auto"; break;
@ -358,8 +488,11 @@ namespace Exiv2 {
return os;
}
std::ostream& CanonMakerNote::print0x0001_05(std::ostream& os, long l)
std::ostream& CanonMakerNote::printCs10x0005(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) return os << value;
long l = value.toLong();
switch (l) {
case 0: os << "Single / timer"; break;
case 1: os << "Continuous"; break;
@ -368,8 +501,11 @@ namespace Exiv2 {
return os;
}
std::ostream& CanonMakerNote::print0x0001_07(std::ostream& os, long l)
std::ostream& CanonMakerNote::printCs10x0007(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) return os << value;
long l = value.toLong();
switch (l) {
case 0: os << "One shot"; break;
case 1: os << "AI servo"; break;
@ -383,8 +519,11 @@ namespace Exiv2 {
return os;
}
std::ostream& CanonMakerNote::print0x0001_10(std::ostream& os, long l)
std::ostream& CanonMakerNote::printCs10x000a(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) return os << value;
long l = value.toLong();
switch (l) {
case 0: os << "Large"; break;
case 1: os << "Medium"; break;
@ -394,8 +533,11 @@ namespace Exiv2 {
return os;
}
std::ostream& CanonMakerNote::print0x0001_11(std::ostream& os, long l)
std::ostream& CanonMakerNote::printCs10x000b(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) return os << value;
long l = value.toLong();
switch (l) {
case 0: os << "Full auto"; break;
case 1: os << "Manual"; break;
@ -414,8 +556,11 @@ namespace Exiv2 {
return os;
}
std::ostream& CanonMakerNote::print0x0001_12(std::ostream& os, long l)
std::ostream& CanonMakerNote::printCs10x000c(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) return os << value;
long l = value.toLong();
switch (l) {
case 0: os << "None"; break;
case 1: os << "2x"; break;
@ -425,8 +570,11 @@ namespace Exiv2 {
return os;
}
std::ostream& CanonMakerNote::print0x0001_lnh(std::ostream& os, long l)
std::ostream& CanonMakerNote::printCs1Lnh(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) return os << value;
long l = value.toLong();
switch (l) {
case 0xffff: os << "Low"; break;
case 0x0000: os << "Normal"; break;
@ -436,8 +584,11 @@ namespace Exiv2 {
return os;
}
std::ostream& CanonMakerNote::print0x0001_16(std::ostream& os, long l)
std::ostream& CanonMakerNote::printCs10x0010(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) return os << value;
long l = value.toLong();
switch (l) {
case 0: os << "n/a"; break;
case 15: os << "Auto"; break;
@ -450,8 +601,11 @@ namespace Exiv2 {
return os;
}
std::ostream& CanonMakerNote::print0x0001_17(std::ostream& os, long l)
std::ostream& CanonMakerNote::printCs10x0011(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) return os << value;
long l = value.toLong();
switch (l) {
case 3: os << "Evaluative"; break;
case 4: os << "Partial"; break;
@ -461,8 +615,11 @@ namespace Exiv2 {
return os;
}
std::ostream& CanonMakerNote::print0x0001_18(std::ostream& os, long l)
std::ostream& CanonMakerNote::printCs10x0012(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) return os << value;
long l = value.toLong();
switch (l) {
case 0: os << "Manual"; break;
case 1: os << "Auto"; break;
@ -473,8 +630,11 @@ namespace Exiv2 {
return os;
}
std::ostream& CanonMakerNote::print0x0001_19(std::ostream& os, long l)
std::ostream& CanonMakerNote::printCs10x0013(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) return os << value;
long l = value.toLong();
switch (l) {
case 0x3000: os << "None (MF)"; break;
case 0x3001: os << "Auto-selected"; break;
@ -486,8 +646,11 @@ namespace Exiv2 {
return os;
}
std::ostream& CanonMakerNote::print0x0001_20(std::ostream& os, long l)
std::ostream& CanonMakerNote::printCs10x0014(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) return os << value;
long l = value.toLong();
switch (l) {
case 0: os << "Easy shooting"; break;
case 1: os << "Program"; break;
@ -500,8 +663,11 @@ namespace Exiv2 {
return os;
}
std::ostream& CanonMakerNote::print0x0001_28(std::ostream& os, long l)
std::ostream& CanonMakerNote::printCs10x001c(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) return os << value;
long l = value.toLong();
switch (l) {
case 0: os << "Did not fire"; break;
case 1: os << "Fired"; break;
@ -510,8 +676,11 @@ namespace Exiv2 {
return os;
}
std::ostream& CanonMakerNote::print0x0001_29(std::ostream& os, long l)
std::ostream& CanonMakerNote::printCs10x001d(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) return os << value;
long l = value.toLong();
bool coma = false;
if (l & 0x4000) {
if (coma) os << ", ";
@ -541,8 +710,11 @@ namespace Exiv2 {
return os;
}
std::ostream& CanonMakerNote::print0x0001_32(std::ostream& os, long l)
std::ostream& CanonMakerNote::printCs10x0020(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) return os << value;
long l = value.toLong();
switch (l) {
case 0: os << "Single"; break;
case 1: os << "Continuous"; break;
@ -551,18 +723,15 @@ namespace Exiv2 {
return os;
}
std::ostream& CanonMakerNote::print0x0001_Lens(std::ostream& os,
const Value& value)
std::ostream& CanonMakerNote::printCs1Lens(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) {
return os;
}
if (value.count() < 26) return os;
if (value.typeId() != unsignedShort) return os << value;
if (value.count() < 3) return os << value;
// Todo: why not use toFloat()?
float fu = static_cast<float>(value.toLong(25));
float len1 = value.toLong(23) / fu;
float len2 = value.toLong(24) / fu;
float fu = value.toFloat(2);
float len1 = value.toLong(0) / fu;
float len2 = value.toLong(1) / fu;
std::ostringstream oss;
oss.copyfmt(os);
os << std::fixed << std::setprecision(1)
@ -571,8 +740,11 @@ namespace Exiv2 {
return os;
}
std::ostream& CanonMakerNote::print0x0004_07(std::ostream& os, long l)
std::ostream& CanonMakerNote::printCs20x0007(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) return os << value;
long l = value.toLong();
switch (l) {
case 0: os << "Auto"; break;
case 1: os << "Sunny"; break;
@ -586,15 +758,21 @@ namespace Exiv2 {
return os;
}
std::ostream& CanonMakerNote::print0x0004_09(std::ostream& os, long l)
std::ostream& CanonMakerNote::printCs20x0009(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) return os << value;
long l = value.toLong();
os << l << "";
// Todo: determine unit
return os;
}
std::ostream& CanonMakerNote::print0x0004_14(std::ostream& os, long l)
std::ostream& CanonMakerNote::printCs20x000e(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) return os << value;
long l = value.toLong();
long num = (l & 0xf000) >> 12;
os << num << " focus points; ";
long used = l & 0x0fff;
@ -623,8 +801,11 @@ namespace Exiv2 {
return os;
}
std::ostream& CanonMakerNote::print0x0004_15(std::ostream& os, long l)
std::ostream& CanonMakerNote::printCs20x000f(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) return os << value;
long l = value.toLong();
switch (l) {
case 0xffc0: os << "-2 EV"; break;
case 0xffcc: os << "-1.67 EV"; break;
@ -648,8 +829,11 @@ namespace Exiv2 {
return os;
}
std::ostream& CanonMakerNote::print0x0004_19(std::ostream& os, long l)
std::ostream& CanonMakerNote::printCs20x0013(std::ostream& os,
const Value& value)
{
if (value.typeId() != unsignedShort) return os << value;
long l = value.toLong();
if (l == 0xffff) {
os << "Infinite";
}

View File

@ -22,7 +22,10 @@
@file canonmn.hpp
@brief Canon MakerNote implemented according to the specification
<a href="http://www.burren.cx/david/canon.html">
EXIF MakerNote of Canon</a> by David Burren
EXIF MakerNote of Canon</a> by David Burren<br>
and with reference to tag information from
<a href="http://www.sno.phy.queensu.ca/~phil/exiftool/">
ExifTool</a> by Phil Harvey
@version $Rev$
@author Andreas Huggel (ahu)
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
@ -104,84 +107,119 @@ namespace Exiv2 {
virtual ~CanonMakerNote() {}
//@}
//! @name Manipulators
//@{
int read(const byte* buf,
long len,
ByteOrder byteOrder,
long offset);
long copy(byte* buf, ByteOrder byteOrder, long offset);
void add(const Entry& entry);
Entries::iterator begin() { return entries_.begin(); }
Entries::iterator end() { return entries_.end(); }
void updateBase(byte* pNewBase);
//@}
//! @name Accessors
//@{
Entries::const_iterator begin() const { return entries_.begin(); }
Entries::const_iterator end() const { return entries_.end(); }
Entries::const_iterator findIdx(int idx) const;
long size() const;
AutoPtr create(bool alloc =true) const;
AutoPtr clone() const;
//@}
//! @name Print functions for Canon %MakerNote tags
//@{
//! Print various camera settings, part 1 (uses print0x0001_XX functions)
static std::ostream& print0x0001(std::ostream& os, const Value& value);
//! Print various camera settings, part 2 (uses print0x0004_XX functions)
static std::ostream& print0x0004(std::ostream& os, const Value& value);
//! Print the image number
static std::ostream& print0x0008(std::ostream& os, const Value& value);
//! Print the serial number of the camera
static std::ostream& print0x000c(std::ostream& os, const Value& value);
//! Print EOS D30 custom functions
static std::ostream& print0x000f(std::ostream& os, const Value& value);
//! Macro mode
static std::ostream& print0x0001_01(std::ostream& os, long l);
static std::ostream& printCs10x0001(std::ostream& os, const Value& value);
//! Self timer
static std::ostream& print0x0001_02(std::ostream& os, long l);
static std::ostream& printCs10x0002(std::ostream& os, const Value& value);
//! Quality
static std::ostream& print0x0001_03(std::ostream& os, long l);
static std::ostream& printCs10x0003(std::ostream& os, const Value& value);
//! Flash mode
static std::ostream& print0x0001_04(std::ostream& os, long l);
static std::ostream& printCs10x0004(std::ostream& os, const Value& value);
//! Drive mode
static std::ostream& print0x0001_05(std::ostream& os, long l);
static std::ostream& printCs10x0005(std::ostream& os, const Value& value);
//! Focus mode (G1 seems to use field 32 in preference to this)
static std::ostream& print0x0001_07(std::ostream& os, long l);
static std::ostream& printCs10x0007(std::ostream& os, const Value& value);
//! Image size
static std::ostream& print0x0001_10(std::ostream& os, long l);
static std::ostream& printCs10x000a(std::ostream& os, const Value& value);
//! Easy shooting
static std::ostream& print0x0001_11(std::ostream& os, long l);
static std::ostream& printCs10x000b(std::ostream& os, const Value& value);
//! Digital zoom
static std::ostream& print0x0001_12(std::ostream& os, long l);
static std::ostream& printCs10x000c(std::ostream& os, const Value& value);
//! ISO
static std::ostream& print0x0001_16(std::ostream& os, long l);
static std::ostream& printCs10x0010(std::ostream& os, const Value& value);
//! Metering mode
static std::ostream& print0x0001_17(std::ostream& os, long l);
static std::ostream& printCs10x0011(std::ostream& os, const Value& value);
//! Focus type
static std::ostream& print0x0001_18(std::ostream& os, long l);
static std::ostream& printCs10x0012(std::ostream& os, const Value& value);
//! AF point selected
static std::ostream& print0x0001_19(std::ostream& os, long l);
static std::ostream& printCs10x0013(std::ostream& os, const Value& value);
//! Exposure mode
static std::ostream& print0x0001_20(std::ostream& os, long l);
static std::ostream& printCs10x0014(std::ostream& os, const Value& value);
//! Flash activity
static std::ostream& print0x0001_28(std::ostream& os, long l);
static std::ostream& printCs10x001c(std::ostream& os, const Value& value);
//! Flash details
static std::ostream& print0x0001_29(std::ostream& os, long l);
static std::ostream& printCs10x001d(std::ostream& os, const Value& value);
//! Focus mode (G1 seems to use this in preference to field 7)
static std::ostream& print0x0001_32(std::ostream& os, long l);
static std::ostream& printCs10x0020(std::ostream& os, const Value& value);
//! Low, normal, high print function
static std::ostream& print0x0001_lnh(std::ostream& os, long l);
static std::ostream& printCs1Lnh(std::ostream& os, const Value& value);
//! Camera lens information
static std::ostream& print0x0001_Lens(std::ostream& os,
const Value& value);
static std::ostream& printCs1Lens(std::ostream& os, const Value& value);
//! White balance
static std::ostream& print0x0004_07(std::ostream& os, long l);
static std::ostream& printCs20x0007(std::ostream& os, const Value& value);
//! Sequence number
static std::ostream& print0x0004_09(std::ostream& os, long l);
static std::ostream& printCs20x0009(std::ostream& os, const Value& value);
//! AF point used
static std::ostream& print0x0004_14(std::ostream& os, long l);
static std::ostream& printCs20x000e(std::ostream& os, const Value& value);
//! Flash bias
static std::ostream& print0x0004_15(std::ostream& os, long l);
static std::ostream& printCs20x000f(std::ostream& os, const Value& value);
//! Subject distance
static std::ostream& print0x0004_19(std::ostream& os, long l);
static std::ostream& printCs20x0013(std::ostream& os, const Value& value);
//@}
private:
//! @name Manipulators
//@{
//! Add a camera settings entry to the makernote entries
void addCsEntry(IfdId ifdId,
uint16_t tag,
long offset,
const byte* data,
int count);
//@}
//! @name Accessors
//@{
//! Assemble special Canon entries into an entry with the original tag
long assemble(Entry& e,
IfdId ifdId,
uint16_t tag,
ByteOrder byteOrder) const;
//! Internal virtual create function.
CanonMakerNote* create_(bool alloc =true) const;
//! Internal virtual copy constructor.
CanonMakerNote* clone_() const;
//@}
// DATA
//! Container to store Makernote entries (instead of Ifd)
Entries entries_;
//! Tag information
static const TagInfo tagInfo_[];
static const TagInfo tagInfoCs1_[];
static const TagInfo tagInfoCs2_[];
static const TagInfo tagInfoCf_[];
//! Structure used to auto-register the MakerNote.
struct RegisterMakerNote {
@ -190,9 +228,20 @@ namespace Exiv2 {
{
MakerNoteFactory& mnf = MakerNoteFactory::instance();
mnf.registerMakerNote("Canon", "*", createCanonMakerNote);
mnf.registerMakerNote(canonIfdId,
MakerNote::AutoPtr(new CanonMakerNote));
mnf.registerMakerNote(canonCs1IfdId,
MakerNote::AutoPtr(new CanonMakerNote));
mnf.registerMakerNote(canonCs2IfdId,
MakerNote::AutoPtr(new CanonMakerNote));
mnf.registerMakerNote(canonCfIfdId,
MakerNote::AutoPtr(new CanonMakerNote));
ExifTags::registerMakerTagInfo(canonIfdId, tagInfo_);
ExifTags::registerMakerTagInfo(canonCs1IfdId, tagInfoCs1_);
ExifTags::registerMakerTagInfo(canonCs2IfdId, tagInfoCs2_);
ExifTags::registerMakerTagInfo(canonCfIfdId, tagInfoCf_);
}
};
/*!

View File

@ -29,7 +29,8 @@
#include "rcsid.hpp"
EXIV2_RCSID("@(#) $Id$");
// Define DEBUG_MAKERNOTE to output debug information to std::cerr
// Define DEBUG_MAKERNOTE to output debug information to std::cerr, e.g, by
// calling make like this: make DEFS=-DDEBUG_MAKERNOTE exif.o
//#define DEBUG_MAKERNOTE
// *****************************************************************************
@ -544,7 +545,9 @@ namespace Exiv2 {
add(pIfd0_->begin(), pIfd0_->end(), byteOrder());
add(pExifIfd_->begin(), pExifIfd_->end(), byteOrder());
if (pMakerNote_) {
add(pMakerNote_->begin(), pMakerNote_->end(), pMakerNote_->byteOrder());
add(pMakerNote_->begin(), pMakerNote_->end(),
(pMakerNote_->byteOrder() == invalidByteOrder ?
byteOrder() : pMakerNote_->byteOrder()));
}
add(pIopIfd_->begin(), pIopIfd_->end(), byteOrder());
add(pGpsIfd_->begin(), pGpsIfd_->end(), byteOrder());
@ -594,7 +597,8 @@ namespace Exiv2 {
makerNote = pMakerNote_->create();
addToMakerNote(makerNote.get(),
begin(), end(),
pMakerNote_->byteOrder());
(pMakerNote_->byteOrder() == invalidByteOrder ?
byteOrder() : pMakerNote_->byteOrder()));
// Create a placeholder MakerNote entry of the correct size and
// add it to the Exif IFD (because we don't know the offset yet)
Entry e;
@ -961,7 +965,8 @@ namespace Exiv2 {
if (pMakerNote_) {
compatible &= updateRange(pMakerNote_->begin(),
pMakerNote_->end(),
pMakerNote_->byteOrder());
(pMakerNote_->byteOrder() == invalidByteOrder ?
byteOrder() : pMakerNote_->byteOrder()));
}
compatible &= updateRange(pIopIfd_->begin(), pIopIfd_->end(), byteOrder());
compatible &= updateRange(pGpsIfd_->begin(), pGpsIfd_->end(), byteOrder());

View File

@ -237,6 +237,18 @@ namespace Exiv2 {
}
} // Entry::setDataAreaOffsets
void Entry::updateBase(byte* pOldBase, byte* pNewBase)
{
if (!alloc_) {
if (pDataArea_) {
pDataArea_ = pDataArea_ - pOldBase + pNewBase;
}
if (pData_) {
pData_ = pData_ - pOldBase + pNewBase;
}
}
} // Entry::updateBase
const byte* Entry::component(uint32_t n) const
{
if (n >= count()) return 0;
@ -588,21 +600,19 @@ namespace Exiv2 {
return entries_.erase(pos);
}
void Ifd::updateBase(byte* pNewBase)
byte* Ifd::updateBase(byte* pNewBase)
{
byte *pOld = 0;
if (!alloc_) {
iterator end = this->end();
for (iterator pos = begin(); pos != end; ++pos) {
if (pos->pDataArea_) {
pos->pDataArea_ = pos->pDataArea_ - pBase_ + pNewBase;
}
if (pos->pData_) {
pos->pData_ = pos->pData_ - pBase_ + pNewBase;
}
pos->updateBase(pBase_, pNewBase);
}
pNext_ = pNext_ - pBase_ + pNewBase;
pOld = pBase_;
pBase_ = pNewBase;
}
return pOld;
}
long Ifd::size() const

View File

@ -56,7 +56,6 @@ namespace Exiv2 {
allocation.
*/
class Entry {
friend class Ifd;
public:
//! @name Creators
//@{
@ -156,6 +155,17 @@ namespace Exiv2 {
unsigned long data component, which is 0.
*/
void setDataAreaOffsets(uint32_t offset, ByteOrder byteOrder);
/*!
@brief Update the base pointer of the Entry from \em pOldBase
to \em pNewBase.
Allows to re-locate the underlying data buffer to a new location
\em pNewBase. This method only has an effect in non-alloc mode.
@param pOldBase Base pointer of the old data buffer
@param pNewBase Base pointer of the new data buffer
*/
void updateBase(byte* pOldBase, byte* pNewBase);
//@}
//! @name Accessors
@ -445,8 +455,10 @@ namespace Exiv2 {
\em pNewBase. This method only has an effect in non-alloc mode.
@param pNewBase Pointer to the new data buffer
@return Old base pointer or 0 if called in alloc mode
*/
void updateBase(byte* pNewBase);
byte* updateBase(byte* pNewBase);
//@}
//! @name Accessors

View File

@ -28,9 +28,10 @@
#include "rcsid.hpp"
EXIV2_RCSID("@(#) $Id$");
// Define DEBUG_* to output debug information to std::cerr
#undef DEBUG_MAKERNOTE
#undef DEBUG_REGISTRY
// Define DEBUG_* to output debug information to std::cerr, e.g, by calling
// make like this: make DEFS=-DDEBUG_MAKERNOTE makernote.o
//#define DEBUG_MAKERNOTE
//#define DEBUG_REGISTRY
// *****************************************************************************
// included header files

View File

@ -64,6 +64,9 @@ namespace Exiv2 {
IfdInfo(iopIfdId, "Iop", "Iop"),
IfdInfo(ifd1Id, "IFD1", "Thumbnail"),
IfdInfo(canonIfdId, "Makernote", "Canon"),
IfdInfo(canonCs1IfdId, "Makernote", "CanonCs1"),
IfdInfo(canonCs2IfdId, "Makernote", "CanonCs2"),
IfdInfo(canonCfIfdId, "Makernote", "CanonCf"),
IfdInfo(fujiIfdId, "Makernote", "Fujifilm"),
IfdInfo(nikon1IfdId, "Makernote", "Nikon1"),
IfdInfo(nikon2IfdId, "Makernote", "Nikon2"),
@ -623,6 +626,7 @@ namespace Exiv2 {
// Find IfdId
IfdId ifdId = ExifTags::ifdIdByIfdItem(ifdItem);
if (ifdId == ifdIdNotSet) throw Error("Invalid key");
if (ExifTags::isMakerIfd(ifdId)) {
MakerNote::AutoPtr makerNote
= MakerNoteFactory::instance().create(ifdId);

View File

@ -88,8 +88,10 @@ namespace Exiv2 {
//! Type to specify the IFD to which a metadata belongs
enum IfdId { ifdIdNotSet,
ifd0Id, exifIfdId, gpsIfdId, iopIfdId, ifd1Id,
canonIfdId, fujiIfdId, nikon1IfdId, nikon2IfdId, nikon3IfdId,
nikon3ThumbIfdId, olympusIfdId, olympusDdIfdId, sigmaIfdId,
canonIfdId, canonCs1IfdId, canonCs2IfdId, canonCfIfdId,
fujiIfdId,
nikon1IfdId, nikon2IfdId, nikon3IfdId, nikon3ThumbIfdId,
olympusIfdId, olympusDdIfdId, sigmaIfdId,
lastIfdId };
// *****************************************************************************

View File

@ -59,14 +59,40 @@ try {
write(file, ed2);
print(file);
std::cout <<"\n----- One Canon MakerNote tag\n";
std::cout <<"\n----- Canon MakerNote tags\n";
Exiv2::ExifData edMn1;
edMn1["Exif.Image.Make"] = "Canon";
edMn1["Exif.Image.Model"] = "Canon PowerShot S40";
edMn1["Exif.Canon.0xabcd"] = "A Canon makernote tag";
edMn1["Exif.CanonCs1.0x0002"] = uint16_t(41);
edMn1["Exif.CanonCs2.0x0005"] = uint16_t(42);
edMn1["Exif.CanonCf.0x0001"] = uint16_t(43);
write(file, edMn1);
print(file);
std::cout <<"\n----- Non-intrusive writing of special Canon MakerNote tags\n";
Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(file);
if (image.get() == 0) {
std::string error(file);
error += " : Could not read file or unknown image type";
throw Exiv2::Error(error);
}
int rc = image->readMetadata();
if (rc) {
std::string error = Exiv2::Image::strError(rc, file);
throw Exiv2::Error(error);
}
Exiv2::ExifData& rEd = image->exifData();
rEd["Exif.CanonCs1.0x0001"] = uint16_t(88);
rEd["Exif.CanonCs2.0x0004"] = uint16_t(99);
rc = image->writeMetadata();
if (rc) {
std::string error = Exiv2::Image::strError(rc, file);
throw Exiv2::Error(error);
}
print(file);
std::cout <<"\n----- One Fujifilm MakerNote tag\n";
Exiv2::ExifData edMn2;
edMn2["Exif.Image.Make"] = "FUJIFILM";

View File

@ -205,10 +205,8 @@ Exif.Photo.ExposureMode 0xa402 Exif Short 1
Exif.Photo.WhiteBalance 0xa403 Exif Short 1 0
Exif.Photo.DigitalZoomRatio 0xa404 Exif Rational 1 2272/2272
Exif.Photo.SceneCaptureType 0xa406 Exif Short 1 0
Exif.Canon.CameraSettings1 0x0001 Makernote Short 40 80 2 0 5 1 0 0 4 0 1 0 1 0 0 0 0 17 5 1 12291 1 65535 65535 682 227 32 149 192 0 0 0 0 0 0 65535 49 2272 2272 0 1
Exif.Canon.0x0002 0x0002 Makernote Short 4 2 682 286 215
Exif.Canon.0x0003 0x0003 Makernote Short 4 0 0 0 0
Exif.Canon.CameraSettings2 0x0004 Makernote Short 27 54 0 160 276 149 287 0 0 0 0 6 0 0 0 12290 0 0 0 1 782 0 149 289 0 0 0 250
Exif.Canon.0x0000 0x0000 Makernote Short 6 0 0 0 0 0 0
Exif.Canon.0x0000 0x0000 Makernote Short 4 0 0 0 0
Exif.Canon.ImageType 0x0006 Makernote Ascii 32 IMG:PowerShot S40 JPEG
@ -217,6 +215,69 @@ Exif.Canon.ImageNumber 0x0008 Makernote Long 1
Exif.Canon.OwnerName 0x0009 Makernote Ascii 32 Andreas Huggel
Exif.Canon.0x0010 0x0010 Makernote Long 1 17891328
Exif.Canon.0x000d 0x000d Makernote Short 21 42 3 32769 378 32769 0 0 0 259 2 0 10 0 0 0 57 198 5 0 0 0
Exif.CanonCs1.Macro 0x0001 Makernote Short 1 2
Exif.CanonCs1.Selftimer 0x0002 Makernote Short 1 0
Exif.CanonCs1.Quality 0x0003 Makernote Short 1 5
Exif.CanonCs1.FlashMode 0x0004 Makernote Short 1 1
Exif.CanonCs1.DriveMode 0x0005 Makernote Short 1 0
Exif.CanonCs1.0x0006 0x0006 Makernote Short 1 0
Exif.CanonCs1.FocusMode 0x0007 Makernote Short 1 4
Exif.CanonCs1.0x0008 0x0008 Makernote Short 1 0
Exif.CanonCs1.0x0009 0x0009 Makernote Short 1 1
Exif.CanonCs1.ImageSize 0x000a Makernote Short 1 0
Exif.CanonCs1.EasyMode 0x000b Makernote Short 1 1
Exif.CanonCs1.DigitalZoom 0x000c Makernote Short 1 0
Exif.CanonCs1.Contrast 0x000d Makernote Short 1 0
Exif.CanonCs1.Saturation 0x000e Makernote Short 1 0
Exif.CanonCs1.Sharpness 0x000f Makernote Short 1 0
Exif.CanonCs1.ISOSpeed 0x0010 Makernote Short 1 17
Exif.CanonCs1.MeteringMode 0x0011 Makernote Short 1 5
Exif.CanonCs1.FocusType 0x0012 Makernote Short 1 1
Exif.CanonCs1.AFPoint 0x0013 Makernote Short 1 12291
Exif.CanonCs1.ExposureProgram 0x0014 Makernote Short 1 1
Exif.CanonCs1.0x0015 0x0015 Makernote Short 1 65535
Exif.CanonCs1.0x0016 0x0016 Makernote Short 1 65535
Exif.CanonCs1.Lens 0x0017 Makernote Short 3 682 227 32
Exif.CanonCs1.0x001a 0x001a Makernote Short 1 149
Exif.CanonCs1.0x001b 0x001b Makernote Short 1 192
Exif.CanonCs1.FlashActivity 0x001c Makernote Short 1 0
Exif.CanonCs1.FlashDetails 0x001d Makernote Short 1 0
Exif.CanonCs1.0x001e 0x001e Makernote Short 1 0
Exif.CanonCs1.0x001f 0x001f Makernote Short 1 0
Exif.CanonCs1.FocusMode 0x0020 Makernote Short 1 0
Exif.CanonCs1.0x0021 0x0021 Makernote Short 1 0
Exif.CanonCs1.0x0022 0x0022 Makernote Short 1 65535
Exif.CanonCs1.0x0023 0x0023 Makernote Short 1 49
Exif.CanonCs1.0x0024 0x0024 Makernote Short 1 2272
Exif.CanonCs1.0x0025 0x0025 Makernote Short 1 2272
Exif.CanonCs1.0x0026 0x0026 Makernote Short 1 0
Exif.CanonCs1.0x0027 0x0027 Makernote Short 1 1
Exif.CanonCs2.0x0001 0x0001 Makernote Short 1 0
Exif.CanonCs2.0x0002 0x0002 Makernote Short 1 160
Exif.CanonCs2.0x0003 0x0003 Makernote Short 1 276
Exif.CanonCs2.0x0004 0x0004 Makernote Short 1 149
Exif.CanonCs2.0x0005 0x0005 Makernote Short 1 287
Exif.CanonCs2.0x0006 0x0006 Makernote Short 1 0
Exif.CanonCs2.WhiteBalance 0x0007 Makernote Short 1 0
Exif.CanonCs2.0x0008 0x0008 Makernote Short 1 0
Exif.CanonCs2.Sequence 0x0009 Makernote Short 1 0
Exif.CanonCs2.0x000a 0x000a Makernote Short 1 6
Exif.CanonCs2.0x000b 0x000b Makernote Short 1 0
Exif.CanonCs2.0x000c 0x000c Makernote Short 1 0
Exif.CanonCs2.0x000d 0x000d Makernote Short 1 0
Exif.CanonCs2.AFPointUsed 0x000e Makernote Short 1 12290
Exif.CanonCs2.FlashBias 0x000f Makernote Short 1 0
Exif.CanonCs2.0x0010 0x0010 Makernote Short 1 0
Exif.CanonCs2.0x0011 0x0011 Makernote Short 1 0
Exif.CanonCs2.0x0012 0x0012 Makernote Short 1 1
Exif.CanonCs2.SubjectDistance 0x0013 Makernote Short 1 782
Exif.CanonCs2.0x0014 0x0014 Makernote Short 1 0
Exif.CanonCs2.0x0015 0x0015 Makernote Short 1 149
Exif.CanonCs2.0x0016 0x0016 Makernote Short 1 289
Exif.CanonCs2.0x0017 0x0017 Makernote Short 1 0
Exif.CanonCs2.0x0018 0x0018 Makernote Short 1 0
Exif.CanonCs2.0x0019 0x0019 Makernote Short 1 0
Exif.CanonCs2.0x001a 0x001a Makernote Short 1 250
Exif.Iop.InteroperabilityIndex 0x0001 Iop Ascii 4 123
Exif.Iop.InteroperabilityVersion 0x0002 Iop Undefined 4 48 49 48 48
Exif.Iop.RelatedImageWidth 0x1001 Iop Short 1 2272
@ -268,10 +329,8 @@ Exif.Photo.ExposureMode 0xa402 Exif Short 1
Exif.Photo.WhiteBalance 0xa403 Exif Short 1 0
Exif.Photo.DigitalZoomRatio 0xa404 Exif Rational 1 2272/2272
Exif.Photo.SceneCaptureType 0xa406 Exif Short 1 0
Exif.Canon.CameraSettings1 0x0001 Makernote Short 40 80 2 0 5 1 0 0 4 0 1 0 1 0 0 0 0 17 5 1 12291 1 65535 65535 682 227 32 149 192 0 0 0 0 0 0 65535 49 2272 2272 0 1
Exif.Canon.0x0002 0x0002 Makernote Short 4 2 682 286 215
Exif.Canon.0x0003 0x0003 Makernote Short 4 0 0 0 0
Exif.Canon.CameraSettings2 0x0004 Makernote Short 27 54 0 160 276 149 287 0 0 0 0 6 0 0 0 12290 0 0 0 1 782 0 149 289 0 0 0 250
Exif.Canon.0x0000 0x0000 Makernote Short 6 0 0 0 0 0 0
Exif.Canon.0x0000 0x0000 Makernote Short 4 0 0 0 0
Exif.Canon.ImageType 0x0006 Makernote Ascii 32 IMG:PowerShot S40 JPEG
@ -280,6 +339,69 @@ Exif.Canon.ImageNumber 0x0008 Makernote Long 1
Exif.Canon.OwnerName 0x0009 Makernote Ascii 32 Andreas Huggel
Exif.Canon.0x0010 0x0010 Makernote Long 1 17891328
Exif.Canon.0x000d 0x000d Makernote Short 21 42 3 32769 378 32769 0 0 0 259 2 0 10 0 0 0 57 198 5 0 0 0
Exif.CanonCs1.Macro 0x0001 Makernote Short 1 2
Exif.CanonCs1.Selftimer 0x0002 Makernote Short 1 0
Exif.CanonCs1.Quality 0x0003 Makernote Short 1 5
Exif.CanonCs1.FlashMode 0x0004 Makernote Short 1 1
Exif.CanonCs1.DriveMode 0x0005 Makernote Short 1 0
Exif.CanonCs1.0x0006 0x0006 Makernote Short 1 0
Exif.CanonCs1.FocusMode 0x0007 Makernote Short 1 4
Exif.CanonCs1.0x0008 0x0008 Makernote Short 1 0
Exif.CanonCs1.0x0009 0x0009 Makernote Short 1 1
Exif.CanonCs1.ImageSize 0x000a Makernote Short 1 0
Exif.CanonCs1.EasyMode 0x000b Makernote Short 1 1
Exif.CanonCs1.DigitalZoom 0x000c Makernote Short 1 0
Exif.CanonCs1.Contrast 0x000d Makernote Short 1 0
Exif.CanonCs1.Saturation 0x000e Makernote Short 1 0
Exif.CanonCs1.Sharpness 0x000f Makernote Short 1 0
Exif.CanonCs1.ISOSpeed 0x0010 Makernote Short 1 17
Exif.CanonCs1.MeteringMode 0x0011 Makernote Short 1 5
Exif.CanonCs1.FocusType 0x0012 Makernote Short 1 1
Exif.CanonCs1.AFPoint 0x0013 Makernote Short 1 12291
Exif.CanonCs1.ExposureProgram 0x0014 Makernote Short 1 1
Exif.CanonCs1.0x0015 0x0015 Makernote Short 1 65535
Exif.CanonCs1.0x0016 0x0016 Makernote Short 1 65535
Exif.CanonCs1.Lens 0x0017 Makernote Short 3 682 227 32
Exif.CanonCs1.0x001a 0x001a Makernote Short 1 149
Exif.CanonCs1.0x001b 0x001b Makernote Short 1 192
Exif.CanonCs1.FlashActivity 0x001c Makernote Short 1 0
Exif.CanonCs1.FlashDetails 0x001d Makernote Short 1 0
Exif.CanonCs1.0x001e 0x001e Makernote Short 1 0
Exif.CanonCs1.0x001f 0x001f Makernote Short 1 0
Exif.CanonCs1.FocusMode 0x0020 Makernote Short 1 0
Exif.CanonCs1.0x0021 0x0021 Makernote Short 1 0
Exif.CanonCs1.0x0022 0x0022 Makernote Short 1 65535
Exif.CanonCs1.0x0023 0x0023 Makernote Short 1 49
Exif.CanonCs1.0x0024 0x0024 Makernote Short 1 2272
Exif.CanonCs1.0x0025 0x0025 Makernote Short 1 2272
Exif.CanonCs1.0x0026 0x0026 Makernote Short 1 0
Exif.CanonCs1.0x0027 0x0027 Makernote Short 1 1
Exif.CanonCs2.0x0001 0x0001 Makernote Short 1 0
Exif.CanonCs2.0x0002 0x0002 Makernote Short 1 160
Exif.CanonCs2.0x0003 0x0003 Makernote Short 1 276
Exif.CanonCs2.0x0004 0x0004 Makernote Short 1 149
Exif.CanonCs2.0x0005 0x0005 Makernote Short 1 287
Exif.CanonCs2.0x0006 0x0006 Makernote Short 1 0
Exif.CanonCs2.WhiteBalance 0x0007 Makernote Short 1 0
Exif.CanonCs2.0x0008 0x0008 Makernote Short 1 0
Exif.CanonCs2.Sequence 0x0009 Makernote Short 1 0
Exif.CanonCs2.0x000a 0x000a Makernote Short 1 6
Exif.CanonCs2.0x000b 0x000b Makernote Short 1 0
Exif.CanonCs2.0x000c 0x000c Makernote Short 1 0
Exif.CanonCs2.0x000d 0x000d Makernote Short 1 0
Exif.CanonCs2.AFPointUsed 0x000e Makernote Short 1 12290
Exif.CanonCs2.FlashBias 0x000f Makernote Short 1 0
Exif.CanonCs2.0x0010 0x0010 Makernote Short 1 0
Exif.CanonCs2.0x0011 0x0011 Makernote Short 1 0
Exif.CanonCs2.0x0012 0x0012 Makernote Short 1 1
Exif.CanonCs2.SubjectDistance 0x0013 Makernote Short 1 782
Exif.CanonCs2.0x0014 0x0014 Makernote Short 1 0
Exif.CanonCs2.0x0015 0x0015 Makernote Short 1 149
Exif.CanonCs2.0x0016 0x0016 Makernote Short 1 289
Exif.CanonCs2.0x0017 0x0017 Makernote Short 1 0
Exif.CanonCs2.0x0018 0x0018 Makernote Short 1 0
Exif.CanonCs2.0x0019 0x0019 Makernote Short 1 0
Exif.CanonCs2.0x001a 0x001a Makernote Short 1 250
Exif.Iop.InteroperabilityIndex 0x0001 Iop Ascii 5 1234
Exif.Iop.InteroperabilityVersion 0x0002 Iop Undefined 4 48 49 48 48
Exif.Iop.RelatedImageWidth 0x1001 Iop Short 1 2272
@ -332,10 +454,8 @@ Exif.Photo.ExposureMode 0xa402 Exif Short 1
Exif.Photo.WhiteBalance 0xa403 Exif Short 1 0
Exif.Photo.DigitalZoomRatio 0xa404 Exif Rational 1 2272/2272
Exif.Photo.SceneCaptureType 0xa406 Exif Short 1 0
Exif.Canon.CameraSettings1 0x0001 Makernote Short 40 80 2 0 5 1 0 0 4 0 1 0 1 0 0 0 0 17 5 1 12291 1 65535 65535 682 227 32 149 192 0 0 0 0 0 0 65535 49 2272 2272 0 1
Exif.Canon.0x0002 0x0002 Makernote Short 4 2 682 286 215
Exif.Canon.0x0003 0x0003 Makernote Short 4 0 0 0 0
Exif.Canon.CameraSettings2 0x0004 Makernote Short 27 54 0 160 276 149 287 0 0 0 0 6 0 0 0 12290 0 0 0 1 782 0 149 289 0 0 0 250
Exif.Canon.0x0000 0x0000 Makernote Short 6 0 0 0 0 0 0
Exif.Canon.0x0000 0x0000 Makernote Short 4 0 0 0 0
Exif.Canon.ImageType 0x0006 Makernote Ascii 32 IMG:PowerShot S40 JPEG
@ -344,6 +464,69 @@ Exif.Canon.ImageNumber 0x0008 Makernote Long 1
Exif.Canon.OwnerName 0x0009 Makernote Ascii 32 Andreas Huggel
Exif.Canon.0x0010 0x0010 Makernote Long 1 17891328
Exif.Canon.0x000d 0x000d Makernote Short 21 42 3 32769 378 32769 0 0 0 259 2 0 10 0 0 0 57 198 5 0 0 0
Exif.CanonCs1.Macro 0x0001 Makernote Short 1 2
Exif.CanonCs1.Selftimer 0x0002 Makernote Short 1 0
Exif.CanonCs1.Quality 0x0003 Makernote Short 1 5
Exif.CanonCs1.FlashMode 0x0004 Makernote Short 1 1
Exif.CanonCs1.DriveMode 0x0005 Makernote Short 1 0
Exif.CanonCs1.0x0006 0x0006 Makernote Short 1 0
Exif.CanonCs1.FocusMode 0x0007 Makernote Short 1 4
Exif.CanonCs1.0x0008 0x0008 Makernote Short 1 0
Exif.CanonCs1.0x0009 0x0009 Makernote Short 1 1
Exif.CanonCs1.ImageSize 0x000a Makernote Short 1 0
Exif.CanonCs1.EasyMode 0x000b Makernote Short 1 1
Exif.CanonCs1.DigitalZoom 0x000c Makernote Short 1 0
Exif.CanonCs1.Contrast 0x000d Makernote Short 1 0
Exif.CanonCs1.Saturation 0x000e Makernote Short 1 0
Exif.CanonCs1.Sharpness 0x000f Makernote Short 1 0
Exif.CanonCs1.ISOSpeed 0x0010 Makernote Short 1 17
Exif.CanonCs1.MeteringMode 0x0011 Makernote Short 1 5
Exif.CanonCs1.FocusType 0x0012 Makernote Short 1 1
Exif.CanonCs1.AFPoint 0x0013 Makernote Short 1 12291
Exif.CanonCs1.ExposureProgram 0x0014 Makernote Short 1 1
Exif.CanonCs1.0x0015 0x0015 Makernote Short 1 65535
Exif.CanonCs1.0x0016 0x0016 Makernote Short 1 65535
Exif.CanonCs1.Lens 0x0017 Makernote Short 3 682 227 32
Exif.CanonCs1.0x001a 0x001a Makernote Short 1 149
Exif.CanonCs1.0x001b 0x001b Makernote Short 1 192
Exif.CanonCs1.FlashActivity 0x001c Makernote Short 1 0
Exif.CanonCs1.FlashDetails 0x001d Makernote Short 1 0
Exif.CanonCs1.0x001e 0x001e Makernote Short 1 0
Exif.CanonCs1.0x001f 0x001f Makernote Short 1 0
Exif.CanonCs1.FocusMode 0x0020 Makernote Short 1 0
Exif.CanonCs1.0x0021 0x0021 Makernote Short 1 0
Exif.CanonCs1.0x0022 0x0022 Makernote Short 1 65535
Exif.CanonCs1.0x0023 0x0023 Makernote Short 1 49
Exif.CanonCs1.0x0024 0x0024 Makernote Short 1 2272
Exif.CanonCs1.0x0025 0x0025 Makernote Short 1 2272
Exif.CanonCs1.0x0026 0x0026 Makernote Short 1 0
Exif.CanonCs1.0x0027 0x0027 Makernote Short 1 1
Exif.CanonCs2.0x0001 0x0001 Makernote Short 1 0
Exif.CanonCs2.0x0002 0x0002 Makernote Short 1 160
Exif.CanonCs2.0x0003 0x0003 Makernote Short 1 276
Exif.CanonCs2.0x0004 0x0004 Makernote Short 1 149
Exif.CanonCs2.0x0005 0x0005 Makernote Short 1 287
Exif.CanonCs2.0x0006 0x0006 Makernote Short 1 0
Exif.CanonCs2.WhiteBalance 0x0007 Makernote Short 1 0
Exif.CanonCs2.0x0008 0x0008 Makernote Short 1 0
Exif.CanonCs2.Sequence 0x0009 Makernote Short 1 0
Exif.CanonCs2.0x000a 0x000a Makernote Short 1 6
Exif.CanonCs2.0x000b 0x000b Makernote Short 1 0
Exif.CanonCs2.0x000c 0x000c Makernote Short 1 0
Exif.CanonCs2.0x000d 0x000d Makernote Short 1 0
Exif.CanonCs2.AFPointUsed 0x000e Makernote Short 1 12290
Exif.CanonCs2.FlashBias 0x000f Makernote Short 1 0
Exif.CanonCs2.0x0010 0x0010 Makernote Short 1 0
Exif.CanonCs2.0x0011 0x0011 Makernote Short 1 0
Exif.CanonCs2.0x0012 0x0012 Makernote Short 1 1
Exif.CanonCs2.SubjectDistance 0x0013 Makernote Short 1 782
Exif.CanonCs2.0x0014 0x0014 Makernote Short 1 0
Exif.CanonCs2.0x0015 0x0015 Makernote Short 1 149
Exif.CanonCs2.0x0016 0x0016 Makernote Short 1 289
Exif.CanonCs2.0x0017 0x0017 Makernote Short 1 0
Exif.CanonCs2.0x0018 0x0018 Makernote Short 1 0
Exif.CanonCs2.0x0019 0x0019 Makernote Short 1 0
Exif.CanonCs2.0x001a 0x001a Makernote Short 1 250
Exif.Iop.InteroperabilityIndex 0x0001 Iop Ascii 4 123
Exif.Iop.InteroperabilityVersion 0x0002 Iop Undefined 4 48 49 48 48
Exif.Iop.RelatedImageWidth 0x1001 Iop Short 1 2272
@ -395,10 +578,8 @@ Exif.Photo.ExposureMode 0xa402 Exif Short 1
Exif.Photo.WhiteBalance 0xa403 Exif Short 1 0
Exif.Photo.DigitalZoomRatio 0xa404 Exif Rational 1 2272/2272
Exif.Photo.SceneCaptureType 0xa406 Exif Short 1 0
Exif.Canon.CameraSettings1 0x0001 Makernote Short 40 80 2 0 5 1 0 0 4 0 1 0 1 0 0 0 0 17 5 1 12291 1 65535 65535 682 227 32 149 192 0 0 0 0 0 0 65535 49 2272 2272 0 1
Exif.Canon.0x0002 0x0002 Makernote Short 4 2 682 286 215
Exif.Canon.0x0003 0x0003 Makernote Short 4 0 0 0 0
Exif.Canon.CameraSettings2 0x0004 Makernote Short 27 54 0 160 276 149 287 0 0 0 0 6 0 0 0 12290 0 0 0 1 782 0 149 289 0 0 0 250
Exif.Canon.0x0000 0x0000 Makernote Short 6 0 0 0 0 0 0
Exif.Canon.0x0000 0x0000 Makernote Short 4 0 0 0 0
Exif.Canon.ImageType 0x0006 Makernote Ascii 32 IMG:PowerShot S40 JPEG
@ -407,6 +588,69 @@ Exif.Canon.ImageNumber 0x0008 Makernote Long 1
Exif.Canon.OwnerName 0x0009 Makernote Ascii 32 Andreas Huggel
Exif.Canon.0x0010 0x0010 Makernote Long 1 17891328
Exif.Canon.0x000d 0x000d Makernote Short 21 42 3 32769 378 32769 0 0 0 259 2 0 10 0 0 0 57 198 5 0 0 0
Exif.CanonCs1.Macro 0x0001 Makernote Short 1 2
Exif.CanonCs1.Selftimer 0x0002 Makernote Short 1 0
Exif.CanonCs1.Quality 0x0003 Makernote Short 1 5
Exif.CanonCs1.FlashMode 0x0004 Makernote Short 1 1
Exif.CanonCs1.DriveMode 0x0005 Makernote Short 1 0
Exif.CanonCs1.0x0006 0x0006 Makernote Short 1 0
Exif.CanonCs1.FocusMode 0x0007 Makernote Short 1 4
Exif.CanonCs1.0x0008 0x0008 Makernote Short 1 0
Exif.CanonCs1.0x0009 0x0009 Makernote Short 1 1
Exif.CanonCs1.ImageSize 0x000a Makernote Short 1 0
Exif.CanonCs1.EasyMode 0x000b Makernote Short 1 1
Exif.CanonCs1.DigitalZoom 0x000c Makernote Short 1 0
Exif.CanonCs1.Contrast 0x000d Makernote Short 1 0
Exif.CanonCs1.Saturation 0x000e Makernote Short 1 0
Exif.CanonCs1.Sharpness 0x000f Makernote Short 1 0
Exif.CanonCs1.ISOSpeed 0x0010 Makernote Short 1 17
Exif.CanonCs1.MeteringMode 0x0011 Makernote Short 1 5
Exif.CanonCs1.FocusType 0x0012 Makernote Short 1 1
Exif.CanonCs1.AFPoint 0x0013 Makernote Short 1 12291
Exif.CanonCs1.ExposureProgram 0x0014 Makernote Short 1 1
Exif.CanonCs1.0x0015 0x0015 Makernote Short 1 65535
Exif.CanonCs1.0x0016 0x0016 Makernote Short 1 65535
Exif.CanonCs1.Lens 0x0017 Makernote Short 3 682 227 32
Exif.CanonCs1.0x001a 0x001a Makernote Short 1 149
Exif.CanonCs1.0x001b 0x001b Makernote Short 1 192
Exif.CanonCs1.FlashActivity 0x001c Makernote Short 1 0
Exif.CanonCs1.FlashDetails 0x001d Makernote Short 1 0
Exif.CanonCs1.0x001e 0x001e Makernote Short 1 0
Exif.CanonCs1.0x001f 0x001f Makernote Short 1 0
Exif.CanonCs1.FocusMode 0x0020 Makernote Short 1 0
Exif.CanonCs1.0x0021 0x0021 Makernote Short 1 0
Exif.CanonCs1.0x0022 0x0022 Makernote Short 1 65535
Exif.CanonCs1.0x0023 0x0023 Makernote Short 1 49
Exif.CanonCs1.0x0024 0x0024 Makernote Short 1 2272
Exif.CanonCs1.0x0025 0x0025 Makernote Short 1 2272
Exif.CanonCs1.0x0026 0x0026 Makernote Short 1 0
Exif.CanonCs1.0x0027 0x0027 Makernote Short 1 1
Exif.CanonCs2.0x0001 0x0001 Makernote Short 1 0
Exif.CanonCs2.0x0002 0x0002 Makernote Short 1 160
Exif.CanonCs2.0x0003 0x0003 Makernote Short 1 276
Exif.CanonCs2.0x0004 0x0004 Makernote Short 1 149
Exif.CanonCs2.0x0005 0x0005 Makernote Short 1 287
Exif.CanonCs2.0x0006 0x0006 Makernote Short 1 0
Exif.CanonCs2.WhiteBalance 0x0007 Makernote Short 1 0
Exif.CanonCs2.0x0008 0x0008 Makernote Short 1 0
Exif.CanonCs2.Sequence 0x0009 Makernote Short 1 0
Exif.CanonCs2.0x000a 0x000a Makernote Short 1 6
Exif.CanonCs2.0x000b 0x000b Makernote Short 1 0
Exif.CanonCs2.0x000c 0x000c Makernote Short 1 0
Exif.CanonCs2.0x000d 0x000d Makernote Short 1 0
Exif.CanonCs2.AFPointUsed 0x000e Makernote Short 1 12290
Exif.CanonCs2.FlashBias 0x000f Makernote Short 1 0
Exif.CanonCs2.0x0010 0x0010 Makernote Short 1 0
Exif.CanonCs2.0x0011 0x0011 Makernote Short 1 0
Exif.CanonCs2.0x0012 0x0012 Makernote Short 1 1
Exif.CanonCs2.SubjectDistance 0x0013 Makernote Short 1 782
Exif.CanonCs2.0x0014 0x0014 Makernote Short 1 0
Exif.CanonCs2.0x0015 0x0015 Makernote Short 1 149
Exif.CanonCs2.0x0016 0x0016 Makernote Short 1 289
Exif.CanonCs2.0x0017 0x0017 Makernote Short 1 0
Exif.CanonCs2.0x0018 0x0018 Makernote Short 1 0
Exif.CanonCs2.0x0019 0x0019 Makernote Short 1 0
Exif.CanonCs2.0x001a 0x001a Makernote Short 1 250
Exif.Iop.InteroperabilityIndex 0x0001 Iop Ascii 4 123
Exif.Iop.InteroperabilityVersion 0x0002 Iop Undefined 4 48 49 48 48
Exif.Iop.RelatedImageWidth 0x1001 Iop Short 1 2272

View File

@ -364,35 +364,8 @@ File 2/9: 20031214_000043.jpg
0xa403 Exif WhiteBalance Auto
0xa404 Exif DigitalZoomRatio 1.0
0xa406 Exif SceneCaptureType Standard
0x0001 Makernote CameraSettings1
Macro mode Off
Self timer Off
Quality Superfine
Flash mode Auto
Drive mode Single / timer
Focus mode Single
Image size Large
Easy shooting mode Manual
Digital zoom None
Contrast Normal
Saturation Normal
Sharpness Normal
ISO 100
Metering mode Center weighted
Focus type Auto
AF point selected Center
Exposure mode Program
Lens 7.1 - 21.3 mm
Flash activity Did not fire
Focus mode Single
0x0002 Makernote 0x0002 2 682 286 215
0x0003 Makernote 0x0003 0 0 0 0
0x0004 Makernote CameraSettings2
White balance Auto
Sequence number 0
AF point used 3 focus points; center used
Flash bias 0 EV
Subject distance (0.01m or 0.001m) 782
0x0000 Makernote 0x0000 0 0 0 0 0 0
0x0000 Makernote 0x0000 0 0 0 0
0x0006 Makernote ImageType IMG:PowerShot S40 JPEG
@ -401,6 +374,69 @@ File 2/9: 20031214_000043.jpg
0x0009 Makernote OwnerName Andreas Huggel
0x0010 Makernote 0x0010 17891328
0x000d Makernote 0x000d 42 3 32769 378 32769 0 0 0 259 2 0 10 0 0 0 57 198 5 0 0 0
0x0001 Makernote Macro Off
0x0002 Makernote Selftimer Off
0x0003 Makernote Quality Superfine
0x0004 Makernote FlashMode Auto
0x0005 Makernote DriveMode Single / timer
0x0006 Makernote 0x0006 0
0x0007 Makernote FocusMode Single
0x0008 Makernote 0x0008 0
0x0009 Makernote 0x0009 1
0x000a Makernote ImageSize Large
0x000b Makernote EasyMode Manual
0x000c Makernote DigitalZoom None
0x000d Makernote Contrast Normal
0x000e Makernote Saturation Normal
0x000f Makernote Sharpness Normal
0x0010 Makernote ISOSpeed 100
0x0011 Makernote MeteringMode Center weighted
0x0012 Makernote FocusType Auto
0x0013 Makernote AFPoint Center
0x0014 Makernote ExposureProgram Program
0x0015 Makernote 0x0015 65535
0x0016 Makernote 0x0016 65535
0x0017 Makernote Lens 7.1 - 21.3 mm
0x001a Makernote 0x001a 149
0x001b Makernote 0x001b 192
0x001c Makernote FlashActivity Did not fire
0x001d Makernote FlashDetails
0x001e Makernote 0x001e 0
0x001f Makernote 0x001f 0
0x0020 Makernote FocusMode Single
0x0021 Makernote 0x0021 0
0x0022 Makernote 0x0022 65535
0x0023 Makernote 0x0023 49
0x0024 Makernote 0x0024 2272
0x0025 Makernote 0x0025 2272
0x0026 Makernote 0x0026 0
0x0027 Makernote 0x0027 1
0x0001 Makernote 0x0001 0
0x0002 Makernote 0x0002 160
0x0003 Makernote 0x0003 276
0x0004 Makernote 0x0004 149
0x0005 Makernote 0x0005 287
0x0006 Makernote 0x0006 0
0x0007 Makernote WhiteBalance Auto
0x0008 Makernote 0x0008 0
0x0009 Makernote Sequence 0
0x000a Makernote 0x000a 6
0x000b Makernote 0x000b 0
0x000c Makernote 0x000c 0
0x000d Makernote 0x000d 0
0x000e Makernote AFPointUsed 3 focus points; center used
0x000f Makernote FlashBias 0 EV
0x0010 Makernote 0x0010 0
0x0011 Makernote 0x0011 0
0x0012 Makernote 0x0012 1
0x0013 Makernote SubjectDistance 782
0x0014 Makernote 0x0014 0
0x0015 Makernote 0x0015 149
0x0016 Makernote 0x0016 289
0x0017 Makernote 0x0017 0
0x0018 Makernote 0x0018 0
0x0019 Makernote 0x0019 0
0x001a Makernote 0x001a 250
0x0001 Iop InteroperabilityIndex R98
0x0002 Iop InteroperabilityVersion 48 49 48 48
0x1001 Iop RelatedImageWidth 2272
@ -670,34 +706,8 @@ Warning: Upper boundary of data for Makernote entry 25 is out of bounds:
0xa402 Exif ExposureMode Auto
0xa403 Exif WhiteBalance Auto
0xa406 Exif SceneCaptureType Standard
0x0001 Makernote CameraSettings1
Macro mode (0)
Self timer Off
Quality Fine
Flash mode Off
Drive mode Single / timer
Focus mode AI Focus
Image size Large
Easy shooting mode Manual
Digital zoom (65535)
Contrast High
Saturation High
Sharpness High
Metering mode Evaluative
Focus type (2)
AF point selected (8197)
Exposure mode Program
Lens 18.0 - 55.0 mm
Flash activity Did not fire
Focus mode (65535)
0x0002 Makernote 0x0002 0 18 914 610
0x0003 Makernote 0x0003 100 0 0 0
0x0004 Makernote CameraSettings2
White balance Auto
Sequence number 0
AF point used 0 focus points; none used
Flash bias 0 EV
Subject distance (0.01m or 0.001m) Infinite
0x0093 Makernote 0x0093 18 0 0 0 0 0 65535 65535 65535
0x0006 Makernote ImageType IMG:EOS 300D DIGITAL JPEG
0x0007 Makernote FirmwareVersion Firmware Version 1.0.2
@ -720,6 +730,81 @@ Warning: Upper boundary of data for Makernote entry 25 is out of bounds:
0x0013 Makernote 0x0013 0 159 7 112
0x0000 Makernote 0x0000 0 0 0 0 0
0x00b6 Makernote 0x00b6
0x0001 Makernote Macro (0)
0x0002 Makernote Selftimer Off
0x0003 Makernote Quality Fine
0x0004 Makernote FlashMode Off
0x0005 Makernote DriveMode Single / timer
0x0006 Makernote 0x0006 0
0x0007 Makernote FocusMode AI Focus
0x0008 Makernote 0x0008 0
0x0009 Makernote 0x0009 1
0x000a Makernote ImageSize Large
0x000b Makernote EasyMode Manual
0x000c Makernote DigitalZoom (65535)
0x000d Makernote Contrast High
0x000e Makernote Saturation High
0x000f Makernote Sharpness High
0x0010 Makernote ISOSpeed n/a
0x0011 Makernote MeteringMode Evaluative
0x0012 Makernote FocusType (2)
0x0013 Makernote AFPoint (8197)
0x0014 Makernote ExposureProgram Program
0x0015 Makernote 0x0015 32767
0x0016 Makernote 0x0016 65535
0x0017 Makernote Lens 18.0 - 55.0 mm
0x001a Makernote 0x001a 116
0x001b Makernote 0x001b 285
0x001c Makernote FlashActivity Did not fire
0x001d Makernote FlashDetails
0x001e Makernote 0x001e 0
0x001f Makernote 0x001f 0
0x0020 Makernote FocusMode (65535)
0x0021 Makernote 0x0021 65535
0x0022 Makernote 0x0022 65535
0x0023 Makernote 0x0023 0
0x0024 Makernote 0x0024 3072
0x0025 Makernote 0x0025 3072
0x0026 Makernote 0x0026 0
0x0027 Makernote 0x0027 65535
0x0028 Makernote 0x0028 65535
0x0029 Makernote 0x0029 0
0x002a Makernote 0x002a 0
0x002b Makernote 0x002b 32767
0x002c Makernote 0x002c 65535
0x002d Makernote 0x002d 65535
0x0001 Makernote 0x0001 0
0x0002 Makernote 0x0002 160
0x0003 Makernote 0x0003 200
0x0004 Makernote 0x0004 159
0x0005 Makernote 0x0005 202
0x0006 Makernote 0x0006 0
0x0007 Makernote WhiteBalance Auto
0x0008 Makernote 0x0008 3
0x0009 Makernote Sequence 0
0x000a Makernote 0x000a 8
0x000b Makernote 0x000b 8
0x000c Makernote 0x000c 0
0x000d Makernote 0x000d 0
0x000e Makernote AFPointUsed 0 focus points; none used
0x000f Makernote FlashBias 0 EV
0x0010 Makernote 0x0010 0
0x0011 Makernote 0x0011 0
0x0012 Makernote 0x0012 1
0x0013 Makernote SubjectDistance Infinite
0x0014 Makernote 0x0014 546
0x0015 Makernote 0x0015 156
0x0016 Makernote 0x0016 204
0x0017 Makernote 0x0017 140
0x0018 Makernote 0x0018 0
0x0019 Makernote 0x0019 0
0x001a Makernote 0x001a 252
0x001b Makernote 0x001b 1
0x001c Makernote 0x001c 65535
0x001d Makernote 0x001d 0
0x001e Makernote 0x001e 0
0x001f Makernote 0x001f 0
0x0020 Makernote 0x0020 0
0x0001 Iop InteroperabilityIndex R98
0x0002 Iop InteroperabilityVersion 48 49 48 48
0x1001 Iop RelatedImageWidth 3072
@ -969,31 +1054,31 @@ Compare image data and extracted data ------------------------------------
---
> File 1/9: exiv2-empty.exv
> File 2/9: 20031214_000043.exv
89c89
125c125
< File 3/9: 20000506_020544.jpg
---
> File 3/9: 20000506_020544.exv
148c148
184c184
< File 4/9: 20040329_224245.jpg
---
> File 4/9: 20040329_224245.exv
252c252
288c288
< File 5/9: 20010405_235039.jpg
---
> File 5/9: 20010405_235039.exv
306c306
342c342
< File 6/9: 20030925_201850.jpg
---
> File 6/9: 20030925_201850.exv
406c406
491c491
< File 7/9: 20001026_044550.jpg
---
> File 7/9: 20001026_044550.exv
446c446
531c531
< File 8/9: 20030926_111535.jpg
---
> File 8/9: 20030926_111535.exv
521c521
606c606
< File 9/9: 20040316_075137.jpg
---
> File 9/9: 20040316_075137.exv
@ -1111,31 +1196,31 @@ Compare original and inserted image data ---------------------------------
---
> File 1/9: exiv2-empty.exv
> File 2/9: 20031214_000043.exv
89c89
125c125
< File 3/9: 20000506_020544.jpg
---
> File 3/9: 20000506_020544.exv
148c148
184c184
< File 4/9: 20040329_224245.jpg
---
> File 4/9: 20040329_224245.exv
252c252
288c288
< File 5/9: 20010405_235039.jpg
---
> File 5/9: 20010405_235039.exv
306c306
342c342
< File 6/9: 20030925_201850.jpg
---
> File 6/9: 20030925_201850.exv
406c406
491c491
< File 7/9: 20001026_044550.jpg
---
> File 7/9: 20001026_044550.exv
446c446
531c531
< File 8/9: 20030926_111535.jpg
---
> File 8/9: 20030926_111535.exv
521c521
606c606
< File 9/9: 20040316_075137.jpg
---
> File 9/9: 20040316_075137.exv

View File

@ -18,7 +18,7 @@ Case 2: Non-intrusive change to the makernote metadata
->>>>>> using non-intrusive writing <<<<<<-
---> Reading file test2.jpg
---> Writing Exif thumbnail to file thumb2.*
49c49
47c47
< Exif.Canon.OwnerName 0x0009 Andreas Huggel
---
> Exif.Canon.OwnerName 0x0009 Chan YeeSend
@ -70,7 +70,7 @@ Case 5: Intrusive change to the Canon makernote metadata
< Exif.Photo.InteroperabilityTag 0xa005 1416
---
> Exif.Photo.InteroperabilityTag 0xa005 1414
49c49
47c47
< Exif.Canon.OwnerName 0x0009 Andreas Huggel
---
> Exif.Canon.OwnerName 0x0009 Frau Chan YeeSend und Herr Andreas Huggel

View File

@ -16,7 +16,7 @@ Case 2: Non-intrusive change to the makernote metadata
---> Writing Exif data to file test2.jpg
---> Reading file test2.jpg
---> Writing Exif thumbnail to file thumb2.*
49c49
47c47
< Exif.Canon.OwnerName 0x0009 Andreas Huggel
---
> Exif.Canon.OwnerName 0x0009 Chan YeeSend
@ -65,7 +65,7 @@ Case 5: Intrusive change to the Canon makernote metadata
< Exif.Photo.InteroperabilityTag 0xa005 1416
---
> Exif.Photo.InteroperabilityTag 0xa005 1414
49c49
47c47
< Exif.Canon.OwnerName 0x0009 Andreas Huggel
---
> Exif.Canon.OwnerName 0x0009 Frau Chan YeeSend und Herr Andreas Huggel

View File

@ -9,11 +9,33 @@ Exif.Image.WhitePoint 0x013e IFD0 Undefined 4
Exif.Image.ExifTag 0x8769 IFD0 Long 1 26
Exif.Photo.DateTimeOriginal 0x9003 Exif Ascii 7 Test 2
----- One Canon MakerNote tag
----- Canon MakerNote tags
Exif.Image.Make 0x010f IFD0 Ascii 6 Canon
Exif.Image.Model 0x0110 IFD0 Ascii 20 Canon PowerShot S40
Exif.Image.ExifTag 0x8769 IFD0 Long 1 76
Exif.Canon.0xabcd 0xabcd Makernote Ascii 22 A Canon makernote tag
Exif.CanonCs1.Macro 0x0001 Makernote Short 1 0
Exif.CanonCs1.Selftimer 0x0002 Makernote Short 1 41
Exif.CanonCs2.0x0001 0x0001 Makernote Short 1 0
Exif.CanonCs2.0x0002 0x0002 Makernote Short 1 0
Exif.CanonCs2.0x0003 0x0003 Makernote Short 1 0
Exif.CanonCs2.0x0004 0x0004 Makernote Short 1 0
Exif.CanonCs2.0x0005 0x0005 Makernote Short 1 42
Exif.CanonCf.NoiseReduction 0x0001 Makernote Short 1 43
----- Non-intrusive writing of special Canon MakerNote tags
Exif.Image.Make 0x010f IFD0 Ascii 6 Canon
Exif.Image.Model 0x0110 IFD0 Ascii 20 Canon PowerShot S40
Exif.Image.ExifTag 0x8769 IFD0 Long 1 76
Exif.Canon.0xabcd 0xabcd Makernote Ascii 22 A Canon makernote tag
Exif.CanonCs1.Macro 0x0001 Makernote Short 1 88
Exif.CanonCs1.Selftimer 0x0002 Makernote Short 1 41
Exif.CanonCs2.0x0001 0x0001 Makernote Short 1 0
Exif.CanonCs2.0x0002 0x0002 Makernote Short 1 0
Exif.CanonCs2.0x0003 0x0003 Makernote Short 1 0
Exif.CanonCs2.0x0004 0x0004 Makernote Short 1 99
Exif.CanonCs2.0x0005 0x0005 Makernote Short 1 42
Exif.CanonCf.NoiseReduction 0x0001 Makernote Short 1 43
----- One Fujifilm MakerNote tag
Exif.Image.Make 0x010f IFD0 Ascii 9 FUJIFILM