[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:41:35 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=fc0d55d
The following commit has been merged in the master branch:
commit fc0d55dd8e063e26da25b784cd5b014cdc6ece3d
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Sun May 2 15:22:57 2010 +0000
#611: SonySR2 support, part 2, still experimental and incomplete.
---
src/exif.cpp | 10 ++
src/makernote_int.hpp | 22 ++++
src/sonymn.cpp | 81 +++++++++++++++
src/sonymn.hpp | 9 ++
src/tags.cpp | 42 ++++++++
src/tiffcomposite.cpp | 34 ++++++-
src/tiffcomposite_int.hpp | 11 +-
src/tiffimage.cpp | 248 +++++++++++++++++++++++++++++++++++++++++++++-
src/tiffvisitor.cpp | 28 +++++-
src/tiffvisitor_int.hpp | 2 +-
src/types.hpp | 32 ++++++
11 files changed, 509 insertions(+), 10 deletions(-)
diff --git a/src/exif.cpp b/src/exif.cpp
index ebed871..ad18508 100644
--- a/src/exif.cpp
+++ b/src/exif.cpp
@@ -693,6 +693,16 @@ namespace Exiv2 {
subImage7Id,
subImage8Id,
subImage9Id,
+ subImage10Id,
+ subImage11Id,
+ subImage12Id,
+ subImage13Id,
+ subImage14Id,
+ subImage15Id,
+ subImage16Id,
+ subImage17Id,
+ subImage18Id,
+ subImage19Id,
panaRawIfdId,
ifd2Id,
ifd3Id
diff --git a/src/makernote_int.hpp b/src/makernote_int.hpp
index 6a87f12..6e1e662 100644
--- a/src/makernote_int.hpp
+++ b/src/makernote_int.hpp
@@ -119,6 +119,28 @@ namespace Exiv2 {
const uint16_t sony2cs = 337; //!< Sony Camera Settings (in Sony2 makernote)
const uint16_t sony2cs2 = 338; //!< Sony Camera Settings 2 (in Sony2 makernote)
const uint16_t sonysr2 = 339; //!< Sony SR2 private tags (in a sub-IFD of Exif.Image.DNGPrivateData)
+ const uint16_t sonysr2ifd= 340; //!< Encrypted Sony SR2 sub-IFD tags
+ const uint16_t sonysr2dt1= 341; //!< Sony SR2 data-IFD 1 tags
+ const uint16_t sonysr2dt2= 342; //!< Sony SR2 data-IFD 2 tags
+ const uint16_t sonysr2dt3= 343; //!< Sony SR2 data-IFD 3 tags
+ const uint16_t sonysr2dt4= 344; //!< Sony SR2 data-IFD 4 tags
+ const uint16_t sonysr2dt5= 345; //!< Sony SR2 data-IFD 5 tags
+ const uint16_t sonysr2dt6= 346; //!< Sony SR2 data-IFD 6 tags
+ const uint16_t sonysr2dt7= 347; //!< Sony SR2 data-IFD 7 tags
+ const uint16_t sonysr2dt8= 348; //!< Sony SR2 data-IFD 8 tags
+ const uint16_t sonysr2dt9= 349; //!< Sony SR2 data-IFD 9 tags
+ const uint16_t sonysr2dt10=350; //!< Sony SR2 data-IFD 10 tags
+ const uint16_t sonysr2dt11=351; //!< Sony SR2 data-IFD 11 tags
+ const uint16_t sonysr2dt12=352; //!< Sony SR2 data-IFD 12 tags
+ const uint16_t sonysr2dt13=353; //!< Sony SR2 data-IFD 13 tags
+ const uint16_t sonysr2dt14=354; //!< Sony SR2 data-IFD 14 tags
+ const uint16_t sonysr2dt15=355; //!< Sony SR2 data-IFD 15 tags
+ const uint16_t sonysr2dt16=356; //!< Sony SR2 data-IFD 16 tags
+ const uint16_t sonysr2dt17=357; //!< Sony SR2 data-IFD 17 tags
+ const uint16_t sonysr2dt18=358; //!< Sony SR2 data-IFD 18 tags
+ const uint16_t sonysr2dt19=359; //!< Sony SR2 data-IFD 19 tags
+ const uint16_t sonyidc = 360; //!< Sony IDC tags
+ const uint16_t sonyidc2 = 361; //!< Sony IDC 2 tags
}
// *****************************************************************************
diff --git a/src/sonymn.cpp b/src/sonymn.cpp
index bb2dbe3..8c46c45 100644
--- a/src/sonymn.cpp
+++ b/src/sonymn.cpp
@@ -694,4 +694,85 @@ namespace Exiv2 {
{
return tagInfoSr2_;
}
+
+ const TagInfo SonyMakerNote::tagInfoSr2SubIfd_[] = {
+ TagInfo(0x7303, "WB_GRBGLevels", N_("WB GRBG Levels"),
+ N_("WB GRBG levels"),
+ sonySr2SubIfdId, makerTags, signedShort, printValue),
+ TagInfo(0x7313, "WB_RGGBLevels", N_("WB RGGB Levels"),
+ N_("WB RGGB levels"),
+ sonySr2SubIfdId, makerTags, signedShort, printValue),
+ TagInfo(0x74a0, "MaxApertureAtMaxFocal", N_("Max Aperture At Max Focal"),
+ N_("Max aperture at max focal"),
+ sonySr2SubIfdId, makerTags, unsignedShort, printValue),
+ TagInfo(0x74a1, "MaxApertureAtMinFocal", N_("Max Aperture At Min Focal"),
+ N_("Max aperture at min focal"),
+ sonySr2SubIfdId, makerTags, unsignedShort, printValue),
+ TagInfo(0x74c0, "SR2DataIFD", N_("SR2 Data-IFD"),
+ N_("SR2 data-IFD"),
+ sonySr2SubIfdId, makerTags, unsignedLong, printValue),
+ TagInfo(0x7820, "WB_RGBLevelsDaylight", N_("WB RGB Levels Daylight"),
+ N_("WB RGB levels daylight"),
+ sonySr2SubIfdId, makerTags, signedShort, printValue),
+ TagInfo(0x7821, "WB_RGBLevelsCloudy", N_("WB RGB Levels Cloudy"),
+ N_("WB RGB levels cloudy"),
+ sonySr2SubIfdId, makerTags, signedShort, printValue),
+ TagInfo(0x7822, "WB_RGBLevelsTungsten", N_("WB RGB Levels Tungsten"),
+ N_("WB RGB levels tungsten"),
+ sonySr2SubIfdId, makerTags, signedShort, printValue),
+ TagInfo(0x7825, "WB_RGBLevelsShade", N_("WB RGB Levels Shade"),
+ N_("WB RGB levels shade"),
+ sonySr2SubIfdId, makerTags, unsignedShort, printValue),
+ TagInfo(0x7826, "WB_RGBLevelsFluorescent", N_("WB RGB Levels Fluorescent"),
+ N_("WB RGB levels fluorescent"),
+ sonySr2SubIfdId, makerTags, unsignedShort, printValue),
+ TagInfo(0x7828, "WB_RGBLevelsFlash", N_("WB RGB Levels Flash"),
+ N_("WB RGB levels flash"),
+ sonySr2SubIfdId, makerTags, unsignedShort, printValue),
+ // End of list marker
+ TagInfo(0xffff, "(UnknownSonySr2SubIfdTag)", "(UnknownSonySr2SubIfdTag)",
+ N_("Unknown Sony SR2 sub-IFD tag"),
+ sonySr2SubIfdId, makerTags, invalidTypeId, printValue)
+ };
+
+ const TagInfo* SonyMakerNote::tagListSr2SubIfd()
+ {
+ return tagInfoSr2SubIfd_;
+ }
+
+ const TagInfo SonyMakerNote::tagInfoSr2Data_[] = {
+ TagInfo(0x7770, "ColorMode", N_("Color Mode"),
+ N_("Color mode"),
+ sonySr2Dt1IfdId, makerTags, asciiString, printValue),
+ // End of list marker
+ TagInfo(0xffff, "(UnknownSonySr2DataTag)", "(UnknownSonySr2DataTag)",
+ N_("Unknown Sony SR2 data-IFD tag"),
+ sonySr2Dt1IfdId, makerTags, invalidTypeId, printValue)
+ };
+
+ const TagInfo* SonyMakerNote::tagListSr2Data()
+ {
+ return tagInfoSr2Data_;
+ }
+
+ const TagInfo SonyMakerNote::tagInfoIdc_[] = {
+ TagInfo(0x0201, "IDCPreviewStart", N_("IDC Preview Start"),
+ N_("IDC preview start"),
+ sonyIdcIfdId, makerTags, unsignedLong, printValue),
+ TagInfo(0x0202, "IDCPreviewLength", N_("IDC Preview Length"),
+ N_("IDC preview length"),
+ sonyIdcIfdId, makerTags, unsignedLong, printValue),
+
+ // Todo: add remaining Sony IDC tags
+
+ // End of list marker
+ TagInfo(0xffff, "(UnknownSonyIdcTag)", "(UnknownSonyIdcTag)",
+ N_("Unknown Sony SR2 sub-IFD tag"),
+ sonyIdcIfdId, makerTags, invalidTypeId, printValue)
+ };
+
+ const TagInfo* SonyMakerNote::tagListIdc()
+ {
+ return tagInfoIdc_;
+ }
} // namespace Exiv2
diff --git a/src/sonymn.hpp b/src/sonymn.hpp
index cac4890..da0dcf5 100644
--- a/src/sonymn.hpp
+++ b/src/sonymn.hpp
@@ -61,6 +61,12 @@ namespace Exiv2 {
static const TagInfo* tagListCs2();
//! Return read-only list of built-in Sony SR2 private tags (found in a sub-IFD of Exif.Image.DNGPrivateData)
static const TagInfo* tagListSr2();
+ //! Return read-only list of built-in Sony SR2 sub-IFD tags
+ static const TagInfo* tagListSr2SubIfd();
+ //! Return read-only list of built-in Sony SR2 data-IFD tags
+ static const TagInfo* tagListSr2Data();
+ //! Return read-only list of built-in Sony IDC tags
+ static const TagInfo* tagListIdc();
//! @name Print functions for Sony %MakerNote tags
//@{
@@ -75,6 +81,9 @@ namespace Exiv2 {
static const TagInfo tagInfoCs_[];
static const TagInfo tagInfoCs2_[];
static const TagInfo tagInfoSr2_[];
+ static const TagInfo tagInfoSr2SubIfd_[];
+ static const TagInfo tagInfoSr2Data_[];
+ static const TagInfo tagInfoIdc_[];
}; // class SonyMakerNote
} // namespace Exiv2
diff --git a/src/tags.cpp b/src/tags.cpp
index c740168..5499653 100644
--- a/src/tags.cpp
+++ b/src/tags.cpp
@@ -110,6 +110,16 @@ namespace Exiv2 {
{ subImage7Id, "SubImage7", "SubImage7", ExifTags::ifdTagList },
{ subImage8Id, "SubImage8", "SubImage8", ExifTags::ifdTagList },
{ subImage9Id, "SubImage9", "SubImage9", ExifTags::ifdTagList },
+ { subImage10Id, "SubImage1", "SubImage10", ExifTags::ifdTagList },
+ { subImage11Id, "SubImage1", "SubImage11", ExifTags::ifdTagList },
+ { subImage12Id, "SubImage1", "SubImage12", ExifTags::ifdTagList },
+ { subImage13Id, "SubImage1", "SubImage13", ExifTags::ifdTagList },
+ { subImage14Id, "SubImage1", "SubImage14", ExifTags::ifdTagList },
+ { subImage15Id, "SubImage1", "SubImage15", ExifTags::ifdTagList },
+ { subImage16Id, "SubImage1", "SubImage16", ExifTags::ifdTagList },
+ { subImage17Id, "SubImage1", "SubImage17", ExifTags::ifdTagList },
+ { subImage18Id, "SubImage1", "SubImage18", ExifTags::ifdTagList },
+ { subImage19Id, "SubImage1", "SubImage19", ExifTags::ifdTagList },
{ mnIfdId, "Makernote", "MakerNote", ExifTags::mnTagList },
{ canonIfdId, "Makernote", "Canon", CanonMakerNote::tagList },
{ canonCsIfdId, "Makernote", "CanonCs", CanonMakerNote::tagListCs },
@@ -182,6 +192,28 @@ namespace Exiv2 {
{ sony2CsIfdId, "Makernote", "Sony2Cs", SonyMakerNote::tagListCs },
{ sony2Cs2IfdId, "Makernote", "Sony2Cs2", SonyMakerNote::tagListCs2 },
{ sonySr2IfdId, "Makernote", "SonySR2", SonyMakerNote::tagListSr2 },
+ { sonySr2SubIfdId, "Makernote", "SonySR2SubIfd",SonyMakerNote::tagListSr2SubIfd},
+ { sonySr2Dt1IfdId, "Makernote", "SonySR2Data1", SonyMakerNote::tagListSr2Data },
+ { sonySr2Dt2IfdId, "Makernote", "SonySR2Data2", SonyMakerNote::tagListSr2Data },
+ { sonySr2Dt3IfdId, "Makernote", "SonySR2Data3", SonyMakerNote::tagListSr2Data },
+ { sonySr2Dt4IfdId, "Makernote", "SonySR2Data4", SonyMakerNote::tagListSr2Data },
+ { sonySr2Dt5IfdId, "Makernote", "SonySR2Data5", SonyMakerNote::tagListSr2Data },
+ { sonySr2Dt6IfdId, "Makernote", "SonySR2Data6", SonyMakerNote::tagListSr2Data },
+ { sonySr2Dt7IfdId, "Makernote", "SonySR2Data7", SonyMakerNote::tagListSr2Data },
+ { sonySr2Dt8IfdId, "Makernote", "SonySR2Data8", SonyMakerNote::tagListSr2Data },
+ { sonySr2Dt9IfdId, "Makernote", "SonySR2Data9", SonyMakerNote::tagListSr2Data },
+ { sonySr2Dt10IfdId, "Makernote", "SonySR2Data10",SonyMakerNote::tagListSr2Data },
+ { sonySr2Dt11IfdId, "Makernote", "SonySR2Data11",SonyMakerNote::tagListSr2Data },
+ { sonySr2Dt12IfdId, "Makernote", "SonySR2Data12",SonyMakerNote::tagListSr2Data },
+ { sonySr2Dt13IfdId, "Makernote", "SonySR2Data13",SonyMakerNote::tagListSr2Data },
+ { sonySr2Dt14IfdId, "Makernote", "SonySR2Data14",SonyMakerNote::tagListSr2Data },
+ { sonySr2Dt15IfdId, "Makernote", "SonySR2Data15",SonyMakerNote::tagListSr2Data },
+ { sonySr2Dt16IfdId, "Makernote", "SonySR2Data16",SonyMakerNote::tagListSr2Data },
+ { sonySr2Dt17IfdId, "Makernote", "SonySR2Data17",SonyMakerNote::tagListSr2Data },
+ { sonySr2Dt18IfdId, "Makernote", "SonySR2Data18",SonyMakerNote::tagListSr2Data },
+ { sonySr2Dt19IfdId, "Makernote", "SonySR2Data19",SonyMakerNote::tagListSr2Data },
+ { sonyIdcIfdId, "Makernote", "SonyIDC", SonyMakerNote::tagListIdc },
+ { sonyIdc2IfdId, "Makernote", "SonyIDC2", SonyMakerNote::tagListIdc },
{ lastIfdId, "(Last IFD info)", "(Last IFD item)", 0 }
};
@@ -1969,6 +2001,16 @@ namespace Exiv2 {
case subImage7Id:
case subImage8Id:
case subImage9Id:
+ case subImage10Id:
+ case subImage11Id:
+ case subImage12Id:
+ case subImage13Id:
+ case subImage14Id:
+ case subImage15Id:
+ case subImage16Id:
+ case subImage17Id:
+ case subImage18Id:
+ case subImage19Id:
case panaRawIfdId: rc = true; break;
default: rc = false; break;
}
diff --git a/src/tiffcomposite.cpp b/src/tiffcomposite.cpp
index 0839060..e08517a 100644
--- a/src/tiffcomposite.cpp
+++ b/src/tiffcomposite.cpp
@@ -93,6 +93,16 @@ namespace Exiv2 {
{ 14, "SubImage7" },
{ 15, "SubImage8" },
{ 16, "SubImage9" },
+ { 17, "SubImage10" },
+ { 18, "SubImage11" },
+ { 19, "SubImage12" },
+ { 20, "SubImage13" },
+ { 21, "SubImage14" },
+ { 22, "SubImage15" },
+ { 23, "SubImage16" },
+ { 24, "SubImage17" },
+ { 25, "SubImage18" },
+ { 26, "SubImage19" },
{ 64, "PanasonicRaw" },
{ 256, "MakerNote" },
// 257 not needed (olympmn)
@@ -167,7 +177,29 @@ namespace Exiv2 {
{ 336, "Sony1MltCs7D" },
{ 337, "Sony2Cs" },
{ 338, "Sony2Cs2" },
- { 339, "SonySR2" }
+ { 339, "SonySR2" },
+ { 340, "SonySR2SubIfd"},
+ { 341, "SonySR2Data1" },
+ { 342, "SonySR2Data2" },
+ { 343, "SonySR2Data3" },
+ { 344, "SonySR2Data4" },
+ { 345, "SonySR2Data5" },
+ { 346, "SonySR2Data6" },
+ { 347, "SonySR2Data7" },
+ { 348, "SonySR2Data8" },
+ { 349, "SonySR2Data9" },
+ { 350, "SonySR2Data10"},
+ { 351, "SonySR2Data11"},
+ { 352, "SonySR2Data12"},
+ { 353, "SonySR2Data13"},
+ { 354, "SonySR2Data14"},
+ { 355, "SonySR2Data15"},
+ { 356, "SonySR2Data16"},
+ { 357, "SonySR2Data17"},
+ { 358, "SonySR2Data18"},
+ { 359, "SonySR2Data19"},
+ { 360, "SonyIDC" },
+ { 361, "SonyIDC2" },
};
bool TiffGroupInfo::operator==(const uint16_t& group) const
diff --git a/src/tiffcomposite_int.hpp b/src/tiffcomposite_int.hpp
index 208c87e..3406563 100644
--- a/src/tiffcomposite_int.hpp
+++ b/src/tiffcomposite_int.hpp
@@ -102,7 +102,16 @@ namespace Exiv2 {
const uint16_t subimg7 = 14; //!< 7th TIFF SubIFD in IFD0
const uint16_t subimg8 = 15; //!< 8th TIFF SubIFD in IFD0
const uint16_t subimg9 = 16; //!< 9th TIFF SubIFD in IFD0
- const uint16_t subimgX = 17; //!< End of SubIFD list marker, not a valid group
+ const uint16_t subimg10= 17; //!< 10th TIFF SubIFD in IFD0
+ const uint16_t subimg11= 18; //!< 11th TIFF SubIFD in IFD0
+ const uint16_t subimg12= 19; //!< 12th TIFF SubIFD in IFD0
+ const uint16_t subimg13= 20; //!< 13th TIFF SubIFD in IFD0
+ const uint16_t subimg14= 21; //!< 14th TIFF SubIFD in IFD0
+ const uint16_t subimg15= 22; //!< 15th TIFF SubIFD in IFD0
+ const uint16_t subimg16= 23; //!< 16th TIFF SubIFD in IFD0
+ const uint16_t subimg17= 24; //!< 17th TIFF SubIFD in IFD0
+ const uint16_t subimg18= 25; //!< 18th TIFF SubIFD in IFD0
+ const uint16_t subimg19= 26; //!< 19th TIFF SubIFD in IFD0
const uint16_t panaraw = 64; //!< IFD0 of Panasonic RAW images
const uint16_t mn = 256; //!< Makernote
const uint16_t ignr = 511; //!< Read but do not decode
diff --git a/src/tiffimage.cpp b/src/tiffimage.cpp
index 619b3c9..16a60b5 100644
--- a/src/tiffimage.cpp
+++ b/src/tiffimage.cpp
@@ -101,7 +101,17 @@ namespace Exiv2 {
"Exif.SubImage6.NewSubfileType",
"Exif.SubImage7.NewSubfileType",
"Exif.SubImage8.NewSubfileType",
- "Exif.SubImage9.NewSubfileType"
+ "Exif.SubImage9.NewSubfileType",
+ "Exif.SubImage10.NewSubfileType",
+ "Exif.SubImage11.NewSubfileType",
+ "Exif.SubImage12.NewSubfileType",
+ "Exif.SubImage13.NewSubfileType",
+ "Exif.SubImage14.NewSubfileType",
+ "Exif.SubImage15.NewSubfileType",
+ "Exif.SubImage16.NewSubfileType",
+ "Exif.SubImage17.NewSubfileType",
+ "Exif.SubImage18.NewSubfileType",
+ "Exif.SubImage19.NewSubfileType",
};
// Find the group of the primary image, default to "Image"
std::string groupName = "Image";
@@ -939,9 +949,41 @@ namespace Exiv2 {
{ Tag::root, Group::subimg7, Group::ifd0, 0x014a },
{ Tag::root, Group::subimg8, Group::ifd0, 0x014a },
{ Tag::root, Group::subimg9, Group::ifd0, 0x014a },
+ { Tag::root, Group::subimg10, Group::ifd0, 0x014a },
+ { Tag::root, Group::subimg11, Group::ifd0, 0x014a },
+ { Tag::root, Group::subimg12, Group::ifd0, 0x014a },
+ { Tag::root, Group::subimg13, Group::ifd0, 0x014a },
+ { Tag::root, Group::subimg14, Group::ifd0, 0x014a },
+ { Tag::root, Group::subimg15, Group::ifd0, 0x014a },
+ { Tag::root, Group::subimg16, Group::ifd0, 0x014a },
+ { Tag::root, Group::subimg17, Group::ifd0, 0x014a },
+ { Tag::root, Group::subimg18, Group::ifd0, 0x014a },
+ { Tag::root, Group::subimg19, Group::ifd0, 0x014a },
{ Tag::root, Group::exif, Group::ifd0, 0x8769 },
{ Tag::root, Group::gps, Group::ifd0, 0x8825 },
{ Tag::root, Group::sonysr2, Group::ifd0, 0xc634 },
+ { Tag::root, Group::sonysr2ifd,Group::sonysr2, 0x7200 },
+ { Tag::root, Group::sonyidc, Group::sonysr2, 0x7240 },
+ { Tag::root, Group::sonyidc2, Group::sonysr2, 0x7241 },
+ { Tag::root, Group::sonysr2dt1,Group::sonysr2ifd,0x74c0 },
+ { Tag::root, Group::sonysr2dt2,Group::sonysr2ifd,0x74c0 },
+ { Tag::root, Group::sonysr2dt3,Group::sonysr2ifd,0x74c0 },
+ { Tag::root, Group::sonysr2dt4,Group::sonysr2ifd,0x74c0 },
+ { Tag::root, Group::sonysr2dt5,Group::sonysr2ifd,0x74c0 },
+ { Tag::root, Group::sonysr2dt6,Group::sonysr2ifd,0x74c0 },
+ { Tag::root, Group::sonysr2dt7,Group::sonysr2ifd,0x74c0 },
+ { Tag::root, Group::sonysr2dt8,Group::sonysr2ifd,0x74c0 },
+ { Tag::root, Group::sonysr2dt9,Group::sonysr2ifd,0x74c0 },
+ { Tag::root, Group::sonysr2dt10,Group::sonysr2ifd,0x74c0 },
+ { Tag::root, Group::sonysr2dt11,Group::sonysr2ifd,0x74c0 },
+ { Tag::root, Group::sonysr2dt12,Group::sonysr2ifd,0x74c0 },
+ { Tag::root, Group::sonysr2dt13,Group::sonysr2ifd,0x74c0 },
+ { Tag::root, Group::sonysr2dt14,Group::sonysr2ifd,0x74c0 },
+ { Tag::root, Group::sonysr2dt15,Group::sonysr2ifd,0x74c0 },
+ { Tag::root, Group::sonysr2dt16,Group::sonysr2ifd,0x74c0 },
+ { Tag::root, Group::sonysr2dt17,Group::sonysr2ifd,0x74c0 },
+ { Tag::root, Group::sonysr2dt18,Group::sonysr2ifd,0x74c0 },
+ { Tag::root, Group::sonysr2dt19,Group::sonysr2ifd,0x74c0 },
{ Tag::root, Group::iop, Group::exif, 0xa005 },
{ Tag::root, Group::ifd1, Group::ifd0, Tag::next },
{ Tag::root, Group::ifd2, Group::ifd1, Tag::next },
@@ -1144,6 +1186,106 @@ namespace Exiv2 {
{ Tag::next, Group::subimg9, newTiffDirectory<Group::ignr> },
{ Tag::all, Group::subimg9, newTiffEntry },
+ // Subdir subimg10
+ { 0x0111, Group::subimg10, newTiffImageData<0x0117, Group::subimg10> },
+ { 0x0117, Group::subimg10, newTiffImageSize<0x0111, Group::subimg10> },
+ { 0x0144, Group::subimg10, newTiffImageData<0x0145, Group::subimg10> },
+ { 0x0145, Group::subimg10, newTiffImageSize<0x0144, Group::subimg10> },
+ { 0x0201, Group::subimg10, newTiffImageData<0x0202, Group::subimg10> },
+ { 0x0202, Group::subimg10, newTiffImageSize<0x0201, Group::subimg10> },
+ { Tag::next, Group::subimg10, newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::subimg10, newTiffEntry },
+
+ // Subdir subimg11
+ { 0x0111, Group::subimg11, newTiffImageData<0x0117, Group::subimg11> },
+ { 0x0117, Group::subimg11, newTiffImageSize<0x0111, Group::subimg11> },
+ { 0x0144, Group::subimg11, newTiffImageData<0x0145, Group::subimg11> },
+ { 0x0145, Group::subimg11, newTiffImageSize<0x0144, Group::subimg11> },
+ { 0x0201, Group::subimg11, newTiffImageData<0x0202, Group::subimg11> },
+ { 0x0202, Group::subimg11, newTiffImageSize<0x0201, Group::subimg11> },
+ { Tag::next, Group::subimg11, newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::subimg11, newTiffEntry },
+
+ // Subdir subimg12
+ { 0x0111, Group::subimg12, newTiffImageData<0x0117, Group::subimg12> },
+ { 0x0117, Group::subimg12, newTiffImageSize<0x0111, Group::subimg12> },
+ { 0x0144, Group::subimg12, newTiffImageData<0x0145, Group::subimg12> },
+ { 0x0145, Group::subimg12, newTiffImageSize<0x0144, Group::subimg12> },
+ { 0x0201, Group::subimg12, newTiffImageData<0x0202, Group::subimg12> },
+ { 0x0202, Group::subimg12, newTiffImageSize<0x0201, Group::subimg12> },
+ { Tag::next, Group::subimg12, newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::subimg12, newTiffEntry },
+
+ // Subdir subimg13
+ { 0x0111, Group::subimg13, newTiffImageData<0x0117, Group::subimg13> },
+ { 0x0117, Group::subimg13, newTiffImageSize<0x0111, Group::subimg13> },
+ { 0x0144, Group::subimg13, newTiffImageData<0x0145, Group::subimg13> },
+ { 0x0145, Group::subimg13, newTiffImageSize<0x0144, Group::subimg13> },
+ { 0x0201, Group::subimg13, newTiffImageData<0x0202, Group::subimg13> },
+ { 0x0202, Group::subimg13, newTiffImageSize<0x0201, Group::subimg13> },
+ { Tag::next, Group::subimg13, newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::subimg13, newTiffEntry },
+
+ // Subdir subimg14
+ { 0x0111, Group::subimg14, newTiffImageData<0x0117, Group::subimg14> },
+ { 0x0117, Group::subimg14, newTiffImageSize<0x0111, Group::subimg14> },
+ { 0x0144, Group::subimg14, newTiffImageData<0x0145, Group::subimg14> },
+ { 0x0145, Group::subimg14, newTiffImageSize<0x0144, Group::subimg14> },
+ { 0x0201, Group::subimg14, newTiffImageData<0x0202, Group::subimg14> },
+ { 0x0202, Group::subimg14, newTiffImageSize<0x0201, Group::subimg14> },
+ { Tag::next, Group::subimg14, newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::subimg14, newTiffEntry },
+
+ // Subdir subimg15
+ { 0x0111, Group::subimg15, newTiffImageData<0x0117, Group::subimg15> },
+ { 0x0117, Group::subimg15, newTiffImageSize<0x0111, Group::subimg15> },
+ { 0x0144, Group::subimg15, newTiffImageData<0x0145, Group::subimg15> },
+ { 0x0145, Group::subimg15, newTiffImageSize<0x0144, Group::subimg15> },
+ { 0x0201, Group::subimg15, newTiffImageData<0x0202, Group::subimg15> },
+ { 0x0202, Group::subimg15, newTiffImageSize<0x0201, Group::subimg15> },
+ { Tag::next, Group::subimg15, newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::subimg15, newTiffEntry },
+
+ // Subdir subimg16
+ { 0x0111, Group::subimg16, newTiffImageData<0x0117, Group::subimg16> },
+ { 0x0117, Group::subimg16, newTiffImageSize<0x0111, Group::subimg16> },
+ { 0x0144, Group::subimg16, newTiffImageData<0x0145, Group::subimg16> },
+ { 0x0145, Group::subimg16, newTiffImageSize<0x0144, Group::subimg16> },
+ { 0x0201, Group::subimg16, newTiffImageData<0x0202, Group::subimg16> },
+ { 0x0202, Group::subimg16, newTiffImageSize<0x0201, Group::subimg16> },
+ { Tag::next, Group::subimg16, newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::subimg16, newTiffEntry },
+
+ // Subdir subimg17
+ { 0x0111, Group::subimg17, newTiffImageData<0x0117, Group::subimg17> },
+ { 0x0117, Group::subimg17, newTiffImageSize<0x0111, Group::subimg17> },
+ { 0x0144, Group::subimg17, newTiffImageData<0x0145, Group::subimg17> },
+ { 0x0145, Group::subimg17, newTiffImageSize<0x0144, Group::subimg17> },
+ { 0x0201, Group::subimg17, newTiffImageData<0x0202, Group::subimg17> },
+ { 0x0202, Group::subimg17, newTiffImageSize<0x0201, Group::subimg17> },
+ { Tag::next, Group::subimg17, newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::subimg17, newTiffEntry },
+
+ // Subdir subimg18
+ { 0x0111, Group::subimg18, newTiffImageData<0x0117, Group::subimg18> },
+ { 0x0117, Group::subimg18, newTiffImageSize<0x0111, Group::subimg18> },
+ { 0x0144, Group::subimg18, newTiffImageData<0x0145, Group::subimg18> },
+ { 0x0145, Group::subimg18, newTiffImageSize<0x0144, Group::subimg18> },
+ { 0x0201, Group::subimg18, newTiffImageData<0x0202, Group::subimg18> },
+ { 0x0202, Group::subimg18, newTiffImageSize<0x0201, Group::subimg18> },
+ { Tag::next, Group::subimg18, newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::subimg18, newTiffEntry },
+
+ // Subdir subimg19
+ { 0x0111, Group::subimg19, newTiffImageData<0x0117, Group::subimg19> },
+ { 0x0117, Group::subimg19, newTiffImageSize<0x0111, Group::subimg19> },
+ { 0x0144, Group::subimg19, newTiffImageData<0x0145, Group::subimg19> },
+ { 0x0145, Group::subimg19, newTiffImageSize<0x0144, Group::subimg19> },
+ { 0x0201, Group::subimg19, newTiffImageData<0x0202, Group::subimg19> },
+ { 0x0202, Group::subimg19, newTiffImageSize<0x0201, Group::subimg19> },
+ { Tag::next, Group::subimg19, newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::subimg19, newTiffEntry },
+
// Exif subdir
{ 0xa005, Group::exif, newTiffSubIfd<Group::iop> },
{ 0x927c, Group::exif, newTiffMnEntry },
@@ -1367,9 +1509,101 @@ namespace Exiv2 {
{ Tag::all, Group::sigmamn, newTiffEntry },
// Sony SR2 Private tags
+// Todo: needs support for 'encrypted sub-IFD' { 0x7200, Group::sonysr2, newTiffSubIfd<Group::sonysr2ifd> },
+ { 0x7240, Group::sonysr2, newTiffSubIfd<Group::sonyidc> },
+ { 0x7241, Group::sonysr2, newTiffSubIfd<Group::sonyidc2> },
{ Tag::next, Group::sonysr2, newTiffDirectory<Group::ignr> },
{ Tag::all, Group::sonysr2, newTiffEntry },
+ // Sony SR2 sub-IFD tags
+ { 0x74c0, Group::sonysr2ifd,newTiffSubIfd<Group::sonysr2dt1> },
+ { Tag::next, Group::sonysr2ifd,newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::sonysr2ifd,newTiffEntry },
+
+ // Sony IDC tags
+ { Tag::next, Group::sonyidc, newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::sonyidc, newTiffEntry },
+
+ // Sony IDC 2 tags
+ { Tag::next, Group::sonyidc2, newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::sonyidc2, newTiffEntry },
+
+ // Sony SR2 data-IFD 1 tags
+ { Tag::next, Group::sonysr2dt1,newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::sonysr2dt1,newTiffEntry },
+
+ // Sony SR2 data-IFD 2 tags
+ { Tag::next, Group::sonysr2dt2,newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::sonysr2dt2,newTiffEntry },
+
+ // Sony SR2 data-IFD 3 tags
+ { Tag::next, Group::sonysr2dt3,newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::sonysr2dt3,newTiffEntry },
+
+ // Sony SR2 data-IFD 4 tags
+ { Tag::next, Group::sonysr2dt4,newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::sonysr2dt4,newTiffEntry },
+
+ // Sony SR2 data-IFD 5 tags
+ { Tag::next, Group::sonysr2dt5,newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::sonysr2dt5,newTiffEntry },
+
+ // Sony SR2 data-IFD 6 tags
+ { Tag::next, Group::sonysr2dt6,newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::sonysr2dt6,newTiffEntry },
+
+ // Sony SR2 data-IFD 7 tags
+ { Tag::next, Group::sonysr2dt7,newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::sonysr2dt7,newTiffEntry },
+
+ // Sony SR2 data-IFD 8 tags
+ { Tag::next, Group::sonysr2dt8,newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::sonysr2dt8,newTiffEntry },
+
+ // Sony SR2 data-IFD 9 tags
+ { Tag::next, Group::sonysr2dt9,newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::sonysr2dt9,newTiffEntry },
+
+ // Sony SR2 data-IFD 10 tags
+ { Tag::next, Group::sonysr2dt10,newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::sonysr2dt10,newTiffEntry },
+
+ // Sony SR2 data-IFD 11 tags
+ { Tag::next, Group::sonysr2dt11,newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::sonysr2dt11,newTiffEntry },
+
+ // Sony SR2 data-IFD 12 tags
+ { Tag::next, Group::sonysr2dt12,newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::sonysr2dt12,newTiffEntry },
+
+ // Sony SR2 data-IFD 13 tags
+ { Tag::next, Group::sonysr2dt13,newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::sonysr2dt13,newTiffEntry },
+
+ // Sony SR2 data-IFD 14 tags
+ { Tag::next, Group::sonysr2dt14,newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::sonysr2dt14,newTiffEntry },
+
+ // Sony SR2 data-IFD 15 tags
+ { Tag::next, Group::sonysr2dt15,newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::sonysr2dt15,newTiffEntry },
+
+ // Sony SR2 data-IFD 16 tags
+ { Tag::next, Group::sonysr2dt16,newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::sonysr2dt16,newTiffEntry },
+
+ // Sony SR2 data-IFD 17 tags
+ { Tag::next, Group::sonysr2dt17,newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::sonysr2dt17,newTiffEntry },
+
+ // Sony SR2 data-IFD 18 tags
+ { Tag::next, Group::sonysr2dt18,newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::sonysr2dt18,newTiffEntry },
+
+ // Sony SR2 data-IFD 19 tags
+ { Tag::next, Group::sonysr2dt19,newTiffDirectory<Group::ignr> },
+ { Tag::all, Group::sonysr2dt19,newTiffEntry },
+
// Sony1 makernote
{ 0x0114, Group::sony1mn, EXV_COMPLEX_BINARY_ARRAY(sony1CsSet, sonyCsSelector) },
{ 0xb028, Group::sony1mn, newTiffSubIfd<Group::sonymltmn> },
@@ -1676,7 +1910,17 @@ namespace Exiv2 {
Group::subimg6,
Group::subimg7,
Group::subimg8,
- Group::subimg9
+ Group::subimg9,
+ Group::subimg10,
+ Group::subimg11,
+ Group::subimg12,
+ Group::subimg13,
+ Group::subimg14,
+ Group::subimg15,
+ Group::subimg16,
+ Group::subimg17,
+ Group::subimg18,
+ Group::subimg19
};
for (unsigned int i = 0; i < EXV_COUNTOF(imageGroups); ++i) {
diff --git a/src/tiffvisitor.cpp b/src/tiffvisitor.cpp
index 1aae237..85eeab9 100644
--- a/src/tiffvisitor.cpp
+++ b/src/tiffvisitor.cpp
@@ -1358,16 +1358,34 @@ namespace Exiv2 {
}
}
if (!(offset && size)) return;
+ DataBuf buf = sonyDecrypt(pData_ + baseOffset() + offset, size, object, byteOrder());
// Todo: remove debug output
std::cout << "offset = " << offset << "
"
<< "size = " << size << "
";
-
- DataBuf buf = sonyDecrypt(pData_ + baseOffset() + offset, size, object, byteOrder());
-
- // Todo: remove debug output
hexdump(std::cout, buf.pData_, EXV_MIN(100, buf.size_));
+// <hack>
+ const byte* pStart = buf.pData_;
+ buf.release(); // Memory leak!
+ TiffComponent::AutoPtr td(new TiffDirectory(object->tag(), Group::sonysr2ifd));
+ td->setStart(pStart);
+ TiffComponent* tc = object->addChild(td);
+ TiffRwState::AutoPtr state(new TiffRwState(byteOrder(), -offset));
+ changeState(state);
+ const byte* pOrigData = pData_;
+ uint32_t origSize = size_;
+ const byte* pOrigLast = pLast_;
+ pData_ = pStart;
+ size_ = size;
+ pLast_ = pStart + size;
+ tc->accept(*this);
+ pData_ = pOrigData;
+ size_ = origSize;
+ pLast_ = pOrigLast;
+ resetState();
+// </hack>
+
} // TiffReader::visitDirectoryEnd
void TiffReader::visitSubIfd(TiffSubIfd* object)
@@ -1421,7 +1439,7 @@ namespace Exiv2 {
#endif
return;
}
- if (object->newGroup_ + i == Group::subimgX) {
+ if (i > 9) { // Todo: should be 19 and shouldn't be hardcoded in the first place
#ifndef SUPPRESS_WARNINGS
std::cerr << "Warning: "
<< "Directory " << tiffGroupName(object->group())
diff --git a/src/tiffvisitor_int.hpp b/src/tiffvisitor_int.hpp
index e313415..02ecb30 100644
--- a/src/tiffvisitor_int.hpp
+++ b/src/tiffvisitor_int.hpp
@@ -720,7 +720,7 @@ namespace Exiv2 {
// DATA
const byte* pData_; //!< Pointer to the memory buffer
- const uint32_t size_; //!< Size of the buffer
+ uint32_t size_; //!< Size of the buffer
const byte* pLast_; //!< Pointer to the last byte
TiffComponent* const pRoot_; //!< Root element of the composite
TiffRwState* pState_; //!< State class
diff --git a/src/types.hpp b/src/types.hpp
index 7b88bdb..44f550f 100644
--- a/src/types.hpp
+++ b/src/types.hpp
@@ -163,6 +163,16 @@ namespace Exiv2 {
subImage7Id,
subImage8Id,
subImage9Id,
+ subImage10Id,
+ subImage11Id,
+ subImage12Id,
+ subImage13Id,
+ subImage14Id,
+ subImage15Id,
+ subImage16Id,
+ subImage17Id,
+ subImage18Id,
+ subImage19Id,
mnIfdId,
canonIfdId,
canonCsIfdId,
@@ -235,6 +245,28 @@ namespace Exiv2 {
sony1MltCsNewIfdId,
sony1MltCsA100IfdId,
sonySr2IfdId,
+ sonySr2SubIfdId,
+ sonySr2Dt1IfdId,
+ sonySr2Dt2IfdId,
+ sonySr2Dt3IfdId,
+ sonySr2Dt4IfdId,
+ sonySr2Dt5IfdId,
+ sonySr2Dt6IfdId,
+ sonySr2Dt7IfdId,
+ sonySr2Dt8IfdId,
+ sonySr2Dt9IfdId,
+ sonySr2Dt10IfdId,
+ sonySr2Dt11IfdId,
+ sonySr2Dt12IfdId,
+ sonySr2Dt13IfdId,
+ sonySr2Dt14IfdId,
+ sonySr2Dt15IfdId,
+ sonySr2Dt16IfdId,
+ sonySr2Dt17IfdId,
+ sonySr2Dt18IfdId,
+ sonySr2Dt19IfdId,
+ sonyIdcIfdId,
+ sonyIdc2IfdId,
lastIfdId
};
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list