From cd5508f16cb1cef37f8a91c76903b4aba044a285 Mon Sep 17 00:00:00 2001 From: Andreas Huggel Date: Sun, 3 Aug 2008 02:02:30 +0000 Subject: [PATCH] #526: Added support for preview image in a sub-IFD of the Nikon3 makernote. --- src/makernote2_int.hpp | 1 + src/tags.cpp | 1 + src/tiffcomposite.cpp | 3 ++- src/tiffimage.cpp | 7 +++++++ src/types.hpp | 2 +- 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/makernote2_int.hpp b/src/makernote2_int.hpp index 9ff57045..a122d3de 100644 --- a/src/makernote2_int.hpp +++ b/src/makernote2_int.hpp @@ -67,6 +67,7 @@ namespace Exiv2 { const uint16_t canonpi = 277; //!< Canon picture info const uint16_t canonpa = 278; //!< Canon panorama const uint16_t pentaxmn = 279; //!< Pentax makernote + const uint16_t nikon3pv = 280; //!< Nikon3 preview sub-IFD } // ***************************************************************************** diff --git a/src/tags.cpp b/src/tags.cpp index 011019d8..1013b9dd 100644 --- a/src/tags.cpp +++ b/src/tags.cpp @@ -101,6 +101,7 @@ namespace Exiv2 { { nikon1IfdId, "Makernote", "Nikon1", Nikon1MakerNote::tagList }, { nikon2IfdId, "Makernote", "Nikon2", Nikon2MakerNote::tagList }, { nikon3IfdId, "Makernote", "Nikon3", Nikon3MakerNote::tagList }, + { nikon3PvIfdId, "Makernote", "Nikon3Preview",ExifTags::ifdTagList }, { olympusIfdId, "Makernote", "Olympus", OlympusMakerNote::tagList }, { panasonicIfdId, "Makernote", "Panasonic", PanasonicMakerNote::tagList }, { pentaxIfdId, "Makernote", "Pentax", PentaxMakerNote::tagList }, diff --git a/src/tiffcomposite.cpp b/src/tiffcomposite.cpp index 838085b5..70385728 100644 --- a/src/tiffcomposite.cpp +++ b/src/tiffcomposite.cpp @@ -98,7 +98,8 @@ namespace Exiv2 { { 276, "MinoltaCs7D" }, { 277, "CanonPi" }, { 278, "CanonPa" }, - { 279, "Pentax" } + { 279, "Pentax" }, + { 280, "Nikon3Preview"} }; bool TiffGroupInfo::operator==(const uint16_t& group) const diff --git a/src/tiffimage.cpp b/src/tiffimage.cpp index f29981b2..6c87e2d0 100644 --- a/src/tiffimage.cpp +++ b/src/tiffimage.cpp @@ -368,8 +368,15 @@ namespace Exiv2 { // Nikon3 makernote { Tag::next, Group::nikon3mn, Group::ignr, 0x927c, Group::exif, newTiffDirectory }, + { 0x0011, Group::nikon3mn, Group::nikon3pv, 0x927c, Group::exif, newTiffSubIfd }, { Tag::all, Group::nikon3mn, Group::nikon3mn, 0x927c, Group::exif, newTiffEntry }, + // Nikon3 makernote preview sub-IFD + { 0x0201, Group::nikon3pv, Group::nikon3pv, 0x0011, Group::nikon3mn, newTiffThumbData<0x0202, Group::nikon3pv> }, + { 0x0202, Group::nikon3pv, Group::nikon3pv, 0x0011, Group::nikon3mn, newTiffThumbSize<0x0201, Group::nikon3pv> }, + { Tag::next, Group::nikon3pv, Group::ignr, 0x0011, Group::nikon3mn, newTiffDirectory }, + { Tag::all, Group::nikon3pv, Group::nikon3pv, 0x0011, Group::nikon3mn, newTiffEntry }, + // Panasonic makernote { Tag::next, Group::panamn, Group::ignr, 0x927c, Group::exif, newTiffDirectory }, { Tag::all, Group::panamn, Group::panamn, 0x927c, Group::exif, newTiffEntry }, diff --git a/src/types.hpp b/src/types.hpp index 6714db60..2aafc91b 100644 --- a/src/types.hpp +++ b/src/types.hpp @@ -141,7 +141,7 @@ namespace Exiv2 { fujiIfdId, minoltaIfdId, minoltaCs5DIfdId, minoltaCs7DIfdId, minoltaCsOldIfdId, minoltaCsNewIfdId, - nikon1IfdId, nikon2IfdId, nikon3IfdId, + nikon1IfdId, nikon2IfdId, nikon3IfdId, nikon3PvIfdId, olympusIfdId, panasonicIfdId, pentaxIfdId, sigmaIfdId, sonyIfdId, lastIfdId };