diff --git a/src/makernote.cpp b/src/makernote.cpp index 6680007d..77f397e6 100644 --- a/src/makernote.cpp +++ b/src/makernote.cpp @@ -310,7 +310,6 @@ namespace Exiv2 { return size_; } // Olympus2MnHeader::write - const byte FujiMnHeader::signature_[] = { 'F', 'U', 'J', 'I', 'F', 'I', 'L', 'M', 0x0c, 0x00, 0x00, 0x00 }; diff --git a/src/tiffcomposite_int.hpp b/src/tiffcomposite_int.hpp index f50bbee4..389d79e6 100644 --- a/src/tiffcomposite_int.hpp +++ b/src/tiffcomposite_int.hpp @@ -64,6 +64,7 @@ namespace Exiv2 { const TiffType ttSignedRational =10; //!< Exif SRATIONAL type const TiffType ttTiffFloat =11; //!< TIFF FLOAT type const TiffType ttTiffDouble =12; //!< TIFF DOUBLE type + const TiffType ttTiffIfd =13; //!< TIFF IFD type //! Convert the \em tiffType of a \em tag and \em group to an Exiv2 \em typeId. TypeId toTypeId(TiffType tiffType, uint16_t tag, uint16_t group); diff --git a/src/tiffimage.cpp b/src/tiffimage.cpp index cc5324f5..e46b737a 100644 --- a/src/tiffimage.cpp +++ b/src/tiffimage.cpp @@ -378,6 +378,11 @@ namespace Exiv2 { { Tag::next, Group::olymp2mn, Group::ignr, 0x927c, Group::exif, newTiffDirectory }, { Tag::all, Group::olymp2mn, Group::olymp2mn, 0x927c, Group::exif, newTiffEntry }, + // Olympus2 camera settings subdir + { 0x0101, Group::olympcs, Group::olympcs, 0x2020, Group::olymp2mn, newTiffImageData<0x0102, Group::olympcs> }, + { 0x0102, Group::olympcs, Group::olympcs, 0x2020, Group::olymp2mn, newTiffImageSize<0x0101, Group::olympcs> }, + { Tag::all, Group::olympcs, Group::olympcs, 0x2020, Group::olymp2mn, newTiffEntry }, + // Fujifilm makernote { Tag::next, Group::fujimn, Group::ignr, 0x927c, Group::exif, newTiffDirectory }, { Tag::all, Group::fujimn, Group::fujimn, 0x927c, Group::exif, newTiffEntry }, @@ -411,7 +416,7 @@ namespace Exiv2 { { 0x0011, Group::nikon3mn, Group::nikonpv, 0x927c, Group::exif, newTiffSubIfd }, { Tag::all, Group::nikon3mn, Group::nikon3mn, 0x927c, Group::exif, newTiffEntry }, - // Nikon3 makernote preview sub-IFD + // Nikon3 makernote preview subdir { 0x0201, Group::nikonpv, Group::nikonpv, 0x0011, Group::nikon3mn, newTiffThumbData<0x0202, Group::nikonpv> }, { 0x0202, Group::nikonpv, Group::nikonpv, 0x0011, Group::nikon3mn, newTiffThumbSize<0x0201, Group::nikonpv> }, { Tag::next, Group::nikonpv, Group::ignr, 0x0011, Group::nikon3mn, newTiffDirectory }, diff --git a/src/tiffvisitor.cpp b/src/tiffvisitor.cpp index 8b25993b..90c558c7 100644 --- a/src/tiffvisitor.cpp +++ b/src/tiffvisitor.cpp @@ -1120,6 +1120,8 @@ namespace Exiv2 { } uint16_t tag = getUShort(p, byteOrder()); TiffComponent::AutoPtr tc = create(tag, object->group()); + // The assertion typically fails if a component is not configured in + // the TIFF structure table assert(tc.get()); tc->setStart(p); object->addChild(tc); @@ -1168,7 +1170,8 @@ namespace Exiv2 { assert(object != 0); readTiffEntry(object); - if ( (object->tiffType() == ttUnsignedLong || object->tiffType() == ttSignedLong) + if ( (object->tiffType() == ttUnsignedLong || object->tiffType() == ttSignedLong + || object->tiffType() == ttTiffIfd) && object->count() >= 1) { for (uint32_t i = 0; i < object->count(); ++i) { int32_t offset = getLong(object->pData() + 4*i, byteOrder()); diff --git a/src/types.cpp b/src/types.cpp index fb624cb7..a2eb9637 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -76,6 +76,7 @@ namespace { { Exiv2::signedRational, "SRational", 8 }, { Exiv2::tiffFloat, "Float", 4 }, { Exiv2::tiffDouble, "Double", 8 }, + { Exiv2::tiffIfd, "Ifd", 4 }, { Exiv2::string, "String", 1 }, { Exiv2::date, "Date", 8 }, { Exiv2::time, "Time", 11 }, diff --git a/src/types.hpp b/src/types.hpp index fc99730f..041bf7cb 100644 --- a/src/types.hpp +++ b/src/types.hpp @@ -118,6 +118,7 @@ namespace Exiv2 { signedRational =10, //!< Exif SRATIONAL type, two SLONGs: numerator and denumerator of a fraction. tiffFloat =11, //!< TIFF FLOAT type, single precision (4-byte) IEEE format. tiffDouble =12, //!< TIFF DOUBLE type, double precision (8-byte) IEEE format. + tiffIfd =13, //!< TIFF IFD type, 32-bit (4-byte) unsigned integer. string =0x10000, //!< IPTC string type. date =0x10001, //!< IPTC date type. time =0x10002, //!< IPTC time type. diff --git a/src/value.cpp b/src/value.cpp index c54d667e..b86930ae 100644 --- a/src/value.cpp +++ b/src/value.cpp @@ -85,6 +85,7 @@ namespace Exiv2 { value = AutoPtr(new ValueType); break; case unsignedLong: + case tiffIfd: value = AutoPtr(new ValueType); break; case unsignedRational: diff --git a/src/value.hpp b/src/value.hpp index 2c470f1a..3318b830 100644 --- a/src/value.hpp +++ b/src/value.hpp @@ -219,6 +219,7 @@ namespace Exiv2 { signedRational%ValueType < Rational > tiffFloat%DataValue(tiffFloat) tiffDouble%DataValue(tiffDouble) + tiffIfd%ValueType < uint32_t > date%DateValue time%TimeValue comment%CommentValue