#611: SonySR2 support, part 2, still experimental and incomplete.
This commit is contained in:
parent
395b5b3a6a
commit
fc0d55dd8e
10
src/exif.cpp
10
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
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
// *****************************************************************************
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
42
src/tags.cpp
42
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;
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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 << "\n"
|
||||
<< "size = " << size << "\n";
|
||||
|
||||
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())
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user