Added type tiffIfd, made decoding of OlympusCs tags work.

v0.27.3
Andreas Huggel 17 years ago
parent 7216dae83d
commit 27d9c0487f

@ -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
};

@ -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);

@ -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 },

@ -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());

@ -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 },

@ -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.

@ -85,6 +85,7 @@ namespace Exiv2 {
value = AutoPtr(new ValueType<uint16_t>);
break;
case unsignedLong:
case tiffIfd:
value = AutoPtr(new ValueType<uint32_t>);
break;
case unsignedRational:

@ -219,6 +219,7 @@ namespace Exiv2 {
<TR><TD class="indexkey">signedRational</TD><TD class="indexvalue">%ValueType &lt; Rational &gt;</TD></TR>
<TR><TD class="indexkey">tiffFloat</TD><TD class="indexvalue">%DataValue(tiffFloat)</TD></TR>
<TR><TD class="indexkey">tiffDouble</TD><TD class="indexvalue">%DataValue(tiffDouble)</TD></TR>
<TR><TD class="indexkey">tiffIfd</TD><TD class="indexvalue">%ValueType &lt; uint32_t &gt;</TD></TR>
<TR><TD class="indexkey">date</TD><TD class="indexvalue">%DateValue</TD></TR>
<TR><TD class="indexkey">time</TD><TD class="indexvalue">%TimeValue</TD></TR>
<TR><TD class="indexkey">comment</TD><TD class="indexvalue">%CommentValue</TD></TR>

Loading…
Cancel
Save