diff --git a/src/fujimn_int.cpp b/src/fujimn_int.cpp index 9668eb7a..55149394 100644 --- a/src/fujimn_int.cpp +++ b/src/fujimn_int.cpp @@ -330,6 +330,47 @@ namespace Exiv2 { TagInfo(0x8003, "FrameNumber", N_("Frame Number"), N_("Frame number"), fujiId, makerTags, unsignedShort, -1, printValue), + // #1402 + TagInfo(0xf000, "FujiIFD", N_("FujiIFD"), + N_("Fujifilm IFD"), + fujiId, makerTags, undefined, -1, printValue), + TagInfo(0xf001, "RawImageFullWidth", N_("Raw Image Full Width"), + N_("Raw Image Full Width"), + fujiId, makerTags, undefined, -1, printValue), + TagInfo(0xf002, "RawImageFullHeight", N_("Raw Image Full Height"), + N_("Raw Image Full Height"), + fujiId, makerTags, undefined, -1, printValue), + TagInfo(0xf003, "BitsPerSample", N_("Bits Per Sample"), + N_("Bits Per Sample"), + fujiId, makerTags, undefined, -1, printValue), + TagInfo(0xf007, "StripOffsets", N_("Strip Offsets"), + N_("Strip Offsets"), + fujiId, makerTags, undefined, -1, printValue), + TagInfo(0xf008, "StripByteCounts", N_("Strip Byte Counts"), + N_("Strip Byte Counts"), + fujiId, makerTags, undefined, -1, printValue), + TagInfo(0xf00a, "BlackLevel", N_("Black Level"), + N_("Black Level"), + fujiId, makerTags, undefined, -1, printValue), + TagInfo(0xf00b, "GeometricDistortionParams", N_("Geometric Distortion Params"), + N_("Geometric Distortion Params"), + fujiId, makerTags, undefined, -1, printValue), + TagInfo(0xf00c, "WB_GRBLevelsStandard", N_("WB GRB Levels Standard"), + N_("WB GRB Levels Standard"), + fujiId, makerTags, undefined, -1, printValue), + TagInfo(0xf00d, "WB_GRBLevelsAuto", N_("WB GRB Levels Auto"), + N_("WB GRB Levels Auto"), + fujiId, makerTags, undefined, -1, printValue), + TagInfo(0xf00e, "WB_GRBLevels", N_("WB GRB Levels"), + N_("WB GRB Levels"), + fujiId, makerTags, undefined, -1, printValue), + TagInfo(0xf00f, "ChromaticAberrationParams", N_("Chromatic Aberration Params"), + N_("Chromatic Aberration Params"), + fujiId, makerTags, undefined, -1, printValue), + TagInfo(0xf010, "VignettingParams", N_("Vignetting Params"), + N_("Vignetting Params"), + fujiId, makerTags, undefined, -1, printValue), + // End of list marker TagInfo(0xffff, "(UnknownFujiMakerNoteTag)", "(UnknownFujiMakerNoteTag)", N_("Unknown FujiMakerNote tag"), diff --git a/src/tiffcomposite_int.hpp b/src/tiffcomposite_int.hpp index 569a8c91..7153243b 100644 --- a/src/tiffcomposite_int.hpp +++ b/src/tiffcomposite_int.hpp @@ -76,11 +76,12 @@ namespace Exiv2 { Special TIFF tags for the use in TIFF structures only */ namespace Tag { - const uint32_t none = 0x10000; //!< Dummy tag - const uint32_t root = 0x20000; //!< Special tag: root IFD - const uint32_t next = 0x30000; //!< Special tag: next IFD - const uint32_t all = 0x40000; //!< Special tag: all tags in a group - const uint32_t pana = 0x80000; //!< Special tag: root IFD of Panasonic RAW images + const uint32_t none = 0x10000; //!< Dummy tag + const uint32_t root = 0x20000; //!< Special tag: root IFD + const uint32_t next = 0x30000; //!< Special tag: next IFD + const uint32_t all = 0x40000; //!< Special tag: all tags in a group + const uint32_t pana = 0x80000; //!< Special tag: root IFD of Panasonic RAW images + const uint32_t fuji = 0x100000; //!< Special tag: root IFD of Fujifilm RAF images } /*! diff --git a/src/tiffimage.cpp b/src/tiffimage.cpp index 21f67297..54cd9b57 100644 --- a/src/tiffimage.cpp +++ b/src/tiffimage.cpp @@ -256,12 +256,22 @@ namespace Exiv2 { uint32_t size ) { + uint32_t root = Tag::root; + + // #1402 Fujifilm RAF. Change root when parsing embedded tiff + Exiv2::ExifKey key("Exif.Image.Make"); + if (exifData.findKey(key) != exifData.end()) { + if ( exifData.findKey(key)->toString() == "FUJIFILM" ) { + root = Tag::fuji; + } + } + return TiffParserWorker::decode(exifData, iptcData, xmpData, pData, size, - Tag::root, + root, TiffMapping::findDecoder); } // TiffParser::decode diff --git a/src/tiffimage_int.cpp b/src/tiffimage_int.cpp index 19c1cb80..d27d75df 100644 --- a/src/tiffimage_int.cpp +++ b/src/tiffimage_int.cpp @@ -1100,8 +1100,9 @@ namespace Exiv2 { // Root directory { Tag::root, ifdIdNotSet, newTiffDirectory }, - // FujiIFD - { 0xf000, ifd0Id, newTiffSubIfd }, + // Fujifilm RAF #1402. Use different root when parsing embedded tiff. + { Tag::fuji, ifdIdNotSet, newTiffDirectory }, + { 0xf000, fujiId, newTiffSubIfd }, // IFD0 { 0x8769, ifd0Id, newTiffSubIfd },