Backed out changes done in Rev. 752

v0.27.3
Andreas Huggel 19 years ago
parent 606d6c9998
commit 6942a28dfa

@ -250,9 +250,9 @@ namespace Action {
// Image Timestamp
printTag(exifData, "Exif.Photo.DateTimeOriginal", "Image timestamp");
// File number
// Todo: File number for cameras other than Canon
printTag(exifData, "Exif.Canon.FileNumber", "File number");
// Image number
// Todo: Image number for cameras other than Canon
printTag(exifData, "Exif.Canon.ImageNumber", "Image number");
// Exposure time
// From ExposureTime, failing that, try ShutterSpeedValue
@ -289,7 +289,7 @@ namespace Action {
done = false;
printLabel("Flash bias");
if (!done) {
done = 0 != printTag(exifData, "Exif.CanonSi.FlashBias");
done = 0 != printTag(exifData, "Exif.CanonCs2.FlashBias");
}
if (!done) {
done = 0 != printTag(exifData, "Exif.Panasonic.FlashBias");
@ -319,7 +319,7 @@ namespace Action {
done = 0 != printTag(exifData, "Exif.Photo.SubjectDistance");
}
if (!done) {
done = 0 != printTag(exifData, "Exif.CanonSi.FocusDistanceUpper");
done = 0 != printTag(exifData, "Exif.CanonCs2.SubjectDistance");
}
std::cout << std::endl;
@ -331,7 +331,7 @@ namespace Action {
done = 0 != printTag(exifData, "Exif.Photo.ISOSpeedRatings");
}
if (!done) {
done = 0 != printTag(exifData, "Exif.CanonSi.ISOSpeed");
done = 0 != printTag(exifData, "Exif.CanonCs2.ISOSpeed");
}
if (!done) {
done = 0 != printTag(exifData, "Exif.Nikon1.ISOSpeed");
@ -345,14 +345,14 @@ namespace Action {
std::cout << std::endl;
// Exposure mode
// From ExposureMode or Canon Makernote
// From ExposureProgram or Canon Makernote
printLabel("Exposure mode");
done = false;
if (!done) {
done = 0 != printTag(exifData, "Exif.Photo.ExposureProgram");
}
if (!done) {
done = 0 != printTag(exifData, "Exif.CanonCs.ExposureMode");
done = 0 != printTag(exifData, "Exif.CanonCs1.ExposureProgram");
}
std::cout << std::endl;
@ -364,7 +364,7 @@ namespace Action {
printLabel("Macro mode");
done = false;
if (!done) {
done = 0 != printTag(exifData, "Exif.CanonCs.Macro");
done = 0 != printTag(exifData, "Exif.CanonCs1.Macro");
}
if (!done) {
done = 0 != printTag(exifData, "Exif.Fujifilm.Macro");
@ -382,7 +382,7 @@ namespace Action {
printLabel("Image quality");
done = false;
if (!done) {
done = 0 != printTag(exifData, "Exif.CanonCs.Quality");
done = 0 != printTag(exifData, "Exif.CanonCs1.Quality");
}
if (!done) {
done = 0 != printTag(exifData, "Exif.Fujifilm.Quality");
@ -425,7 +425,7 @@ namespace Action {
printLabel("White balance");
done = false;
if (!done) {
done = 0 != printTag(exifData, "Exif.CanonSi.WhiteBalance");
done = 0 != printTag(exifData, "Exif.CanonCs2.WhiteBalance");
}
if (!done) {
done = 0 != printTag(exifData, "Exif.Fujifilm.WhiteBalance");
@ -467,14 +467,7 @@ namespace Action {
printTag(exifData, "Exif.Image.Copyright", "Copyright");
// Exif Comment
printLabel("Exif comment");
done = false;
if (!done) {
done = 0 != printTag(exifData, "Exif.Photo.UserComment");
}
if (!done) {
done = 0 != printTag(exifData, "Exif.Image.ImageDescription");
}
printTag(exifData, "Exif.Photo.UserComment", "Exif comment");
std::cout << std::endl;
return 0;

File diff suppressed because it is too large Load Diff

@ -135,87 +135,63 @@ namespace Exiv2 {
//@{
//! Print the image number
static std::ostream& print0x0008(std::ostream& os, const Value& value);
//! Print the model ID
static std::ostream& print0x0010(std::ostream& os, const Value& value);
//! Print the color space
static std::ostream& print0x00b4(std::ostream& os, const Value& value);
//! Print the serial number format
static std::ostream& print0x0015(std::ostream& os, const Value& value);
//! Print the serial number of the camera
static std::ostream& print0x000c(std::ostream& os, const Value& value);
//! Macro mode
static std::ostream& printCs0x0001(std::ostream& os, const Value& value);
static std::ostream& printCs10x0001(std::ostream& os, const Value& value);
//! Self timer
static std::ostream& printCs0x0002(std::ostream& os, const Value& value);
static std::ostream& printCs10x0002(std::ostream& os, const Value& value);
//! Quality
static std::ostream& printCs0x0003(std::ostream& os, const Value& value);
static std::ostream& printCs10x0003(std::ostream& os, const Value& value);
//! Flash mode
static std::ostream& printCs0x0004(std::ostream& os, const Value& value);
static std::ostream& printCs10x0004(std::ostream& os, const Value& value);
//! Drive mode
static std::ostream& printCs0x0005(std::ostream& os, const Value& value);
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& printCs0x0007(std::ostream& os, const Value& value);
static std::ostream& printCs10x0007(std::ostream& os, const Value& value);
//! Image size
static std::ostream& printCs0x000a(std::ostream& os, const Value& value);
static std::ostream& printCs10x000a(std::ostream& os, const Value& value);
//! Easy shooting
static std::ostream& printCs0x000b(std::ostream& os, const Value& value);
static std::ostream& printCs10x000b(std::ostream& os, const Value& value);
//! Digital zoom
static std::ostream& printCs0x000c(std::ostream& os, const Value& value);
static std::ostream& printCs10x000c(std::ostream& os, const Value& value);
//! ISO
static std::ostream& printCs0x0010(std::ostream& os, const Value& value);
static std::ostream& printCs10x0010(std::ostream& os, const Value& value);
//! Metering mode
static std::ostream& printCs0x0011(std::ostream& os, const Value& value);
//! Focus range
static std::ostream& printCs0x0012(std::ostream& os, const Value& value);
static std::ostream& printCs10x0011(std::ostream& os, const Value& value);
//! Focus type
static std::ostream& printCs10x0012(std::ostream& os, const Value& value);
//! AF point selected
static std::ostream& printCs0x0013(std::ostream& os, const Value& value);
static std::ostream& printCs10x0013(std::ostream& os, const Value& value);
//! Exposure mode
static std::ostream& printCs0x0014(std::ostream& os, const Value& value);
//! LensType mode
static std::ostream& printCs0x0016(std::ostream& os, const Value& value);
static std::ostream& printCs10x0014(std::ostream& os, const Value& value);
//! Flash activity
static std::ostream& printCs0x001c(std::ostream& os, const Value& value);
static std::ostream& printCs10x001c(std::ostream& os, const Value& value);
//! Flash details
static std::ostream& printCs0x001d(std::ostream& os, const Value& value);
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& printCs0x0020(std::ostream& os, const Value& value);
//! AE Setting
static std::ostream& printCs0x0021(std::ostream& os, const Value& value);
//! Image Stabilization
static std::ostream& printCs0x0022(std::ostream& os, const Value& value);
//! Photo Effect
static std::ostream& printCs0x0026(std::ostream& os, const Value& value);
//! Focal Type
static std::ostream& printFl0x0000(std::ostream& os, const Value& value);
static std::ostream& printCs10x0020(std::ostream& os, const Value& value);
//! Low, normal, high print function
static std::ostream& printCsLnh(std::ostream& os, const Value& value);
//! Aperture
static std::ostream& printCsAper(std::ostream& os, const Value& value);
static std::ostream& printCs1Lnh(std::ostream& os, const Value& value);
//! Camera lens information
static std::ostream& printCs1Lens(std::ostream& os, const Value& value);
//! ISO speed used
static std::ostream& printSi0x0002(std::ostream& os, const Value& value);
static std::ostream& printCs20x0002(std::ostream& os, const Value& value);
//! White balance
static std::ostream& printSi0x0007(std::ostream& os, const Value& value);
//! Slow shutter
static std::ostream& printSi0x0008(std::ostream& os, const Value& value);
static std::ostream& printCs20x0007(std::ostream& os, const Value& value);
//! Sequence number
static std::ostream& printSi0x0009(std::ostream& os, const Value& value);
static std::ostream& printCs20x0009(std::ostream& os, const Value& value);
//! AF point used
static std::ostream& printSi0x000e(std::ostream& os, const Value& value);
static std::ostream& printCs20x000e(std::ostream& os, const Value& value);
//! Flash bias
static std::ostream& printSi0x000f(std::ostream& os, const Value& value);
//! Auto Exposure Bracketing
static std::ostream& printSi0x0010(std::ostream& os, const Value& value);
static std::ostream& printCs20x000f(std::ostream& os, const Value& value);
//! Subject distance
static std::ostream& printSi0x0013(std::ostream& os, const Value& value);
//! Auto Rorate
static std::ostream& printSi0x001b(std::ostream& os, const Value& value);
//! Panorama Frame2
static std::ostream& printPa0x0001(std::ostream& os, const Value& value);
//! Panorama Direction
static std::ostream& printPa0x0005(std::ostream& os, const Value& value);
static std::ostream& printCs20x0013(std::ostream& os, const Value& value);
//! Aperture
static std::ostream& printCs20x0015(std::ostream& os, const Value& value);
//! Shutter speed
static std::ostream& printSiExp(std::ostream& os, const Value& value);
static std::ostream& printCs20x0016(std::ostream& os, const Value& value);
//@}
//! @cond IGNORE
@ -255,26 +231,9 @@ namespace Exiv2 {
//! Tag information
static const TagInfo tagInfo_[];
static const TagInfo tagInfoCs_[];
static const TagInfo tagInfoFl_[];
static const TagInfo tagInfoSi_[];
static const TagInfo tagInfoPa_[];
static const TagInfo tagInfoCl2_[];
static const TagInfo tagInfoCi_[];
static const TagInfo tagInfoCs1_[];
static const TagInfo tagInfoCs2_[];
static const TagInfo tagInfoCf_[];
static const TagInfo tagInfoPi_[];
static const TagInfo tagInfoCf2_[];
static const TagInfo tagInfoPf_[];
static const TagInfo tagInfoPv_[];
static const TagInfo tagInfoFi_[];
static const TagInfo tagInfoPc_[];
static const TagInfo tagInfoCb_[];
static const TagInfo tagInfoFg_[];
static const TagInfo tagInfoMi_[];
static const TagInfo tagInfoPr_[];
static const TagInfo tagInfoSn_[];
static const TagInfo tagInfoCb2_[];
static const TagInfo tagInfoCl_[];
}; // class CanonMakerNote

@ -992,26 +992,9 @@ namespace Exiv2 {
IfdId ifdId = ifdIdNotSet;
switch (pCrwMapping->tag_) {
case 0x0001: ifdId = canonCsIfdId; break;
case 0x0002: ifdId = canonFlIfdId; break;
case 0x0004: ifdId = canonSiIfdId; break;
case 0x0005: ifdId = canonPaIfdId; break;
case 0x000a: ifdId = canonCl2IfdId; break;
case 0x000d: ifdId = canonCiIfdId; break;
case 0x0001: ifdId = canonCs1IfdId; break;
case 0x0004: ifdId = canonCs2IfdId; break;
case 0x000f: ifdId = canonCfIfdId; break;
case 0x0012: ifdId = canonPiIfdId; break;
case 0x0090: ifdId = canonCf2IfdId; break;
case 0x0091: ifdId = canonPfIfdId; break;
case 0x0092: ifdId = canonPvIfdId; break;
case 0x0093: ifdId = canonFiIfdId; break;
case 0x00a0: ifdId = canonPcIfdId; break;
case 0x00a9: ifdId = canonCbIfdId; break;
case 0x00b0: ifdId = canonFgIfdId; break;
case 0x00b1: ifdId = canonMiIfdId; break;
case 0x00b6: ifdId = canonPrIfdId; break;
case 0x00e0: ifdId = canonSnIfdId; break;
case 0x4001: ifdId = canonCb2IfdId; break;
case 0x4003: ifdId = canonClIfdId; break;
}
assert(ifdId != ifdIdNotSet);
@ -1021,15 +1004,15 @@ namespace Exiv2 {
uint16_t n = 1;
ExifKey key(c, ifdItem);
UShortValue value;
if (ifdId == canonCsIfdId && c == 23 && ciffComponent.size() > 50) n = 3;
if (ifdId == canonCs1IfdId && c == 23 && ciffComponent.size() > 50) n = 3;
value.read(ciffComponent.pData() + c*2, n*2, byteOrder);
image.exifData().add(key, &value);
if (ifdId == canonSiIfdId && c == 21) aperture = value.toLong();
if (ifdId == canonSiIfdId && c == 22) shutterSpeed = value.toLong();
if (ifdId == canonCs2IfdId && c == 21) aperture = value.toLong();
if (ifdId == canonCs2IfdId && c == 22) shutterSpeed = value.toLong();
c += n;
}
if (ifdId == canonSiIfdId) {
if (ifdId == canonCs2IfdId) {
// Exif.Photo.FNumber
float f = fnumber(canonEv(aperture));
// Beware: primitive conversion algorithm
@ -1256,26 +1239,9 @@ namespace Exiv2 {
IfdId ifdId = ifdIdNotSet;
switch (pCrwMapping->tag_) {
case 0x0001: ifdId = canonCsIfdId; break;
case 0x0002: ifdId = canonFlIfdId; break;
case 0x0004: ifdId = canonSiIfdId; break;
case 0x0005: ifdId = canonPaIfdId; break;
case 0x000a: ifdId = canonCl2IfdId; break;
case 0x000d: ifdId = canonCiIfdId; break;
case 0x0001: ifdId = canonCs1IfdId; break;
case 0x0004: ifdId = canonCs2IfdId; break;
case 0x000f: ifdId = canonCfIfdId; break;
case 0x0012: ifdId = canonPiIfdId; break;
case 0x0090: ifdId = canonCf2IfdId; break;
case 0x0091: ifdId = canonPfIfdId; break;
case 0x0092: ifdId = canonPvIfdId; break;
case 0x0093: ifdId = canonFiIfdId; break;
case 0x00a0: ifdId = canonPcIfdId; break;
case 0x00a9: ifdId = canonCbIfdId; break;
case 0x00b0: ifdId = canonFgIfdId; break;
case 0x00b1: ifdId = canonMiIfdId; break;
case 0x00b6: ifdId = canonPrIfdId; break;
case 0x00e0: ifdId = canonSnIfdId; break;
case 0x4001: ifdId = canonCb2IfdId; break;
case 0x4003: ifdId = canonClIfdId; break;
}
assert(ifdId != ifdIdNotSet);
DataBuf buf = packIfdId(image.exifData(), ifdId, pHead->byteOrder());

@ -315,8 +315,6 @@ namespace Exiv2 {
virtual std::string groupName() const { return recordName(); }
virtual std::string tagName() const
{ return IptcDataSets::dataSetName(tag_, record_); }
virtual std::string tagTitle() const
{ return IptcDataSets::dataSetTitle(tag_, record_); }
virtual uint16_t tag() const { return tag_; }
AutoPtr clone() const;

@ -173,12 +173,13 @@ namespace Exiv2 {
//! Return the key of the %Exifdatum.
std::string key() const
{ return key_.get() == 0 ? "" : key_->key(); }
//! Return the name of the group (the second part of the key)
std::string groupName() const
{ return key_.get() == 0 ? "" : key_->groupName(); }
//! Return the name of the tag (which is also the third part of the key)
std::string tagName() const
{ return key_.get() == 0 ? "" : key_->tagName(); }
std::string tagTitle() const
{ return key_.get() == 0 ? "" : key_->tagTitle(); }
//! Return the tag
uint16_t tag() const
{ return key_.get() == 0 ? 0xffff : key_->tag(); }
//! Return the IFD id

@ -151,8 +151,6 @@ namespace Exiv2 {
*/
std::string tagName() const
{ return key_.get() == 0 ? "" : key_->tagName(); }
std::string tagTitle() const
{ return key_.get() == 0 ? "" : key_->tagTitle(); }
//! Return the tag (aka dataset) number
uint16_t tag() const
{ return key_.get() == 0 ? 0 : key_->tag(); }

@ -79,8 +79,6 @@ namespace Exiv2 {
virtual std::string groupName() const =0;
//! Return the name of the tag (which is also the third part of the key)
virtual std::string tagName() const =0;
//! Return the title of the tag
virtual std::string tagTitle() const =0;
//! Return the tag number
virtual uint16_t tag() const =0;
/*!
@ -174,8 +172,6 @@ namespace Exiv2 {
virtual std::string key() const =0;
//! Return the name of the tag (which is also the third part of the key)
virtual std::string tagName() const =0;
//! Return the name of the tag (which is also the third part of the key)
virtual std::string tagTitle() const =0;
//! Return the tag
virtual uint16_t tag() const =0;
//! Return the type id of the value

@ -58,7 +58,7 @@ try {
}
if (rc) {
std::cout << "Usage: " << argv[0]
<< " [Exif|Canon|CanonCs|CanonSi|CanonCf|Fujifilm|Nikon1|Nikon2|Nikon3|Olympus|Sigma|Sony|Iptc]\n"
<< " [Exif|Canon|CanonCs1|CanonCs2|CanonCf|Fujifilm|Nikon1|Nikon2|Nikon3|Olympus|Sigma|Sony|Iptc]\n"
<< "Print Exif tags, MakerNote tags, or Iptc datasets\n";
}
return rc;

@ -66,26 +66,9 @@ namespace Exiv2 {
IfdInfo(iopIfdId, "Iop", "Iop"),
IfdInfo(ifd1Id, "IFD1", "Thumbnail"),
IfdInfo(canonIfdId, "Makernote", "Canon"),
IfdInfo(canonCsIfdId, "Makernote", "CanonCs"), // Camera Settings
IfdInfo(canonFlIfdId, "Makernote", "CanonFl"), // Focal Length
IfdInfo(canonSiIfdId, "Makernote", "CanonSi"), // Shot Info
IfdInfo(canonPaIfdId, "Makernote", "CanonPa"), // Panorama
IfdInfo(canonCl2IfdId, "Makernote", "CanonCl2"), // Color Info 2
IfdInfo(canonCiIfdId, "Makernote", "CanonCi"), // Camera Info
IfdInfo(canonCfIfdId, "Makernote", "CanonCf"), // Custom Functions
IfdInfo(canonPiIfdId, "Makernote", "CanonPi"), // Picture Info
IfdInfo(canonCf2IfdId, "Makernote", "CanonCf2"), // Custom Functions 2
IfdInfo(canonPfIfdId, "Makernote", "CanonPf"), // Personal Functions
IfdInfo(canonPvIfdId, "Makernote", "CanonPv"), // Personal Values
IfdInfo(canonFiIfdId, "Makernote", "CanonFi"), // File Info
IfdInfo(canonPcIfdId, "Makernote", "CanonPc"), // Processing
IfdInfo(canonCbIfdId, "Makernote", "CanonCb"), // Color Balance
IfdInfo(canonFgIfdId, "Makernote", "CanonFg"), // Flags
IfdInfo(canonMiIfdId, "Makernote", "CanonMi"), // Modified Info
IfdInfo(canonPrIfdId, "Makernote", "CanonPr"), // Preview Image Info
IfdInfo(canonSnIfdId, "Makernote", "CanonSn"), // Sensor Info
IfdInfo(canonCb2IfdId, "Makernote", "CanonCb2"), // Color Balance 2
IfdInfo(canonClIfdId, "Makernote", "CanonCl"), // Color Info
IfdInfo(canonCs1IfdId, "Makernote", "CanonCs1"),
IfdInfo(canonCs2IfdId, "Makernote", "CanonCs2"),
IfdInfo(canonCfIfdId, "Makernote", "CanonCf"),
IfdInfo(fujiIfdId, "Makernote", "Fujifilm"),
IfdInfo(nikon1IfdId, "Makernote", "Nikon1"),
IfdInfo(nikon2IfdId, "Makernote", "Nikon2"),
@ -420,7 +403,7 @@ namespace Exiv2 {
return os.str();
} // ExifTags::tagName
std::string ExifTags::tagTitle(uint16_t tag, IfdId ifdId)
const char* ExifTags::tagTitle(uint16_t tag, IfdId ifdId)
{
if (isExifIfd(ifdId)) {
int idx = tagInfoIdx(tag, ifdId);
@ -656,11 +639,6 @@ namespace Exiv2 {
return ExifTags::tagName(tag_, ifdId_);
}
std::string ExifKey::tagTitle() const
{
return ExifTags::tagTitle(tag_, ifdId_);
}
ExifKey::AutoPtr ExifKey::clone() const
{
return AutoPtr(clone_());

@ -172,7 +172,7 @@ namespace Exiv2 {
@param ifdId IFD id
@return The title (label) of the tag.
*/
static std::string tagTitle(uint16_t tag, IfdId ifdId);
static const char* tagTitle(uint16_t tag, IfdId ifdId);
/*!
@brief Return the description of the tag.
@param tag The tag
@ -254,7 +254,7 @@ namespace Exiv2 {
static const TagInfo* tagInfos_[];
static const int MAX_MAKER_TAG_INFOS = 128;
static const int MAX_MAKER_TAG_INFOS = 64;
static const TagInfo* makerTagInfos_[MAX_MAKER_TAG_INFOS];
static IfdId makerIfdIds_[MAX_MAKER_TAG_INFOS];
@ -314,7 +314,6 @@ namespace Exiv2 {
*/
virtual std::string groupName() const { return ifdItem(); }
virtual std::string tagName() const;
virtual std::string tagTitle() const;
virtual uint16_t tag() const { return tag_; }
AutoPtr clone() const;

@ -96,12 +96,8 @@ namespace Exiv2 {
//! Type to specify the IFD to which a metadata belongs
enum IfdId { ifdIdNotSet,
ifd0Id, exifIfdId, gpsIfdId, iopIfdId, ifd1Id,
canonIfdId, canonCsIfdId, canonFlIfdId, canonSiIfdId,
canonPaIfdId, canonCl2IfdId, canonCiIfdId, canonCfIfdId,
canonPiIfdId, canonCf2IfdId, canonPfIfdId, canonPvIfdId,
canonFiIfdId, canonPcIfdId, canonCbIfdId, canonFgIfdId,
canonMiIfdId, canonPrIfdId, canonSnIfdId, canonCb2IfdId,
canonClIfdId, fujiIfdId, nikon1IfdId, nikon2IfdId, nikon3IfdId,
canonIfdId, canonCs1IfdId, canonCs2IfdId, canonCfIfdId,
fujiIfdId, nikon1IfdId, nikon2IfdId, nikon3IfdId,
olympusIfdId, panasonicIfdId, sigmaIfdId, sonyIfdId,
lastIfdId };

@ -65,8 +65,8 @@ try {
edMn1["Exif.Image.Make"] = "Canon";
edMn1["Exif.Image.Model"] = "Canon PowerShot S40";
edMn1["Exif.Canon.0xabcd"] = "A Canon makernote tag";
edMn1["Exif.CanonCs.0x0002"] = uint16_t(41);
edMn1["Exif.CanonSi.0x0005"] = uint16_t(42);
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);
@ -77,8 +77,8 @@ try {
image->readMetadata();
Exiv2::ExifData& rEd = image->exifData();
rEd["Exif.CanonCs.0x0001"] = uint16_t(88);
rEd["Exif.CanonSi.0x0004"] = uint16_t(99);
rEd["Exif.CanonCs1.0x0001"] = uint16_t(88);
rEd["Exif.CanonCs2.0x0004"] = uint16_t(99);
image->writeMetadata();
print(file);

Loading…
Cancel
Save