From 8dde51e054f91cc9b1b691aa9acb47d07c5d783f Mon Sep 17 00:00:00 2001 From: Andreas Huggel Date: Wed, 21 Apr 2010 14:29:37 +0000 Subject: [PATCH] #611: Added several Sony makernote groups. --- src/makernote_int.hpp | 9 +- src/preview.cpp | 20 +++-- src/sonymn.cpp | 194 +++++++++++++++++++++--------------------- src/tags.cpp | 12 ++- src/tiffcomposite.cpp | 15 +++- src/tiffimage.cpp | 118 ++++++++++++++++++++----- src/types.hpp | 12 ++- 7 files changed, 240 insertions(+), 140 deletions(-) diff --git a/src/makernote_int.hpp b/src/makernote_int.hpp index 2dfb00d2..bfc7ea57 100644 --- a/src/makernote_int.hpp +++ b/src/makernote_int.hpp @@ -110,8 +110,13 @@ namespace Exiv2 { const uint16_t nikonsi6 = 318; //!< Nikon Shot Info v1.* Tags const uint16_t canonfi = 320; //!< Canon File Info const uint16_t sonymltmn = 330; //!< Sony Minolta Makernotes - const uint16_t sonycs = 331; //!< Sony Camera Settings - const uint16_t sonycs2 = 332; //!< Sony Camera Settings Version 2 + const uint16_t sony1cs = 331; //!< Sony Camera Settings (in Sony1 makernote) + const uint16_t sony2cs = 332; //!< Sony Camera Settings (in Sony2 makernote) + const uint16_t sony1mcso = 333; //!< Minolta (old) Camera Settings (in Sony1 makernote) + const uint16_t sony1mcsn = 334; //!< Minolta (new) Camera Settings (in Sony1 makernote) + const uint16_t sony1mcs5 = 335; //!< Minolta D5 Camera Settings (in Sony1 makernote) + const uint16_t sony1mcs7 = 336; //!< Minolta D7 Camera Settings (in Sony1 makernote) + const uint16_t sony1cs2 = 337; //!< Sony Camera Settings 2 (in Sony1 makernote) } // ***************************************************************************** diff --git a/src/preview.cpp b/src/preview.cpp index 7f047c3a..ae7d4652 100644 --- a/src/preview.cpp +++ b/src/preview.cpp @@ -218,7 +218,7 @@ namespace { //! Tag that contains image data. Possible values are "StripOffsets" or "TileOffsets" std::string offsetTag_; - //! Tag that contains data sizes. Possible values are "StripByteCountss" or "TileByteCounts" + //! Tag that contains data sizes. Possible values are "StripByteCounts" or "TileByteCounts" std::string sizeTag_; //! Structure that lists preview groups @@ -247,7 +247,8 @@ namespace { { 0, createLoaderExifDataJpeg, 4 }, { 0, createLoaderExifDataJpeg, 5 }, { 0, createLoaderExifDataJpeg, 6 }, - { "image/x-raw", createLoaderExifDataJpeg, 7 }, + { 0, createLoaderExifDataJpeg, 7 }, + { "image/x-raw", createLoaderExifDataJpeg, 8 }, { 0, createLoaderTiff, 0 }, { 0, createLoaderTiff, 1 }, { 0, createLoaderTiff, 2 }, @@ -272,7 +273,7 @@ namespace { { "Exif.SubImage4.JPEGInterchangeFormat", "Exif.SubImage4.JPEGInterchangeFormatLength", 0 }, // 4 { "Exif.Image2.JPEGInterchangeFormat", "Exif.Image2.JPEGInterchangeFormatLength", 0 }, // 5 { "Exif.Image.StripOffsets", "Exif.Image.StripByteCounts", 0 }, // 6 - { "Exif.OlympusCs.PreviewImageStart", "Exif.OlympusCs.PreviewImageLength", "Exif.MakerNote.Offset"} // 7 + { "Exif.OlympusCs.PreviewImageStart", "Exif.OlympusCs.PreviewImageLength", "Exif.MakerNote.Offset"} // 7 }; const LoaderExifDataJpeg::Param LoaderExifDataJpeg::param_[] = { @@ -280,10 +281,11 @@ namespace { { "Exif.NikonPreview.JPEGInterchangeFormat", "Exif.NikonPreview.JPEGInterchangeFormatLength" }, // 1 { "Exif.Pentax.PreviewOffset", "Exif.Pentax.PreviewLength" }, // 2 { "Exif.Minolta.ThumbnailOffset", "Exif.Minolta.ThumbnailLength" }, // 3 - { "Exif.Olympus.ThumbnailImage", 0 }, // 4 - { "Exif.Olympus2.ThumbnailImage", 0 }, // 5 - { "Exif.Minolta.Thumbnail", 0 }, // 6 - { "Exif.PanasonicRaw.PreviewImage", 0 } // 7 + { "Exif.SonyMinolta.ThumbnailOffset", "Exif.SonyMinolta.ThumbnailLength" }, // 4 + { "Exif.Olympus.ThumbnailImage", 0 }, // 5 + { "Exif.Olympus2.ThumbnailImage", 0 }, // 6 + { "Exif.Minolta.Thumbnail", 0 }, // 7 + { "Exif.PanasonicRaw.PreviewImage", 0 } // 8 }; const LoaderTiff::Param LoaderTiff::param_[] = { @@ -766,8 +768,8 @@ namespace Exiv2 { PreviewPropertiesList PreviewManager::getPreviewProperties() const { PreviewPropertiesList list; - // go through the loader table and store all successfuly created loaders in the list - for (PreviewId id = 0; id < Loader::getNumLoaders(); id++) { + // go through the loader table and store all successfully created loaders in the list + for (PreviewId id = 0; id < Loader::getNumLoaders(); ++id) { Loader::AutoPtr loader = Loader::create(id, image_); if (loader.get() && loader->readDimensions()) { list.push_back(loader->getProperties()); diff --git a/src/sonymn.cpp b/src/sonymn.cpp index b2f7cfff..64eaddbc 100644 --- a/src/sonymn.cpp +++ b/src/sonymn.cpp @@ -238,138 +238,137 @@ namespace Exiv2 { // Sony MakerNote Tag Info const TagInfo SonyMakerNote::tagInfo_[] = { - TagInfo(0x0102, "Quality", N_("Image Quality"), N_("Image quality"), - sonyIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(sonyImageQuality)), + sony1IfdId, makerTags, unsignedLong, EXV_PRINT_TAG(sonyImageQuality)), TagInfo(0x0104, "FlashExposureComp", N_("Flash Exposure Compensation"), N_("Flash exposure compensation in EV"), - sonyIfdId, makerTags, signedRational, printValue), + sony1IfdId, makerTags, signedRational, printValue), TagInfo(0x0105, "Teleconverter", N_("Teleconverter Model"), N_("Teleconverter Model"), - sonyIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(sonyTeleconverterModel)), + sony1IfdId, makerTags, unsignedLong, EXV_PRINT_TAG(sonyTeleconverterModel)), TagInfo(0x0112, "WhiteBalanceFineTune", N_("White Balance Fine Tune"), N_("White Balance Fine Tune Value"), - sonyIfdId, makerTags, unsignedLong, printValue), + sony1IfdId, makerTags, unsignedLong, printValue), TagInfo(0x0114, "CameraSettings", N_("Camera Settings"), N_("Camera Settings"), - sonyIfdId, makerTags, undefined, printValue), + sony1IfdId, makerTags, undefined, printValue), TagInfo(0x0115, "WhiteBalance", N_("White Balance"), N_("White balance"), - sonyIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(sonyWhiteBalanceStd)), + sony1IfdId, makerTags, unsignedLong, EXV_PRINT_TAG(sonyWhiteBalanceStd)), TagInfo(0x0116, "0x0116", "0x0116", N_("Unknown"), - sonyIfdId, makerTags, undefined, printValue), + sony1IfdId, makerTags, undefined, printValue), TagInfo(0x0e00, "PrintIM", N_("Print IM"), N_("PrintIM information"), - sonyIfdId, makerTags, undefined, printValue), + sony1IfdId, makerTags, undefined, printValue), TagInfo(0x2000, "0x2000", "0x2000", N_("Unknown"), - sonyIfdId, makerTags, undefined, printValue), + sony1IfdId, makerTags, undefined, printValue), TagInfo(0x2001, "PreviewImage", N_("Preview Image"), N_("Preview Image"), - sonyIfdId, makerTags, undefined, printValue), + sony1IfdId, makerTags, undefined, printValue), TagInfo(0x2002, "0x2002", "0x2002", N_("Unknown"), - sonyIfdId, makerTags, unsignedLong, printValue), + sony1IfdId, makerTags, unsignedLong, printValue), TagInfo(0x2003, "0x2003", "0x2003", N_("Unknown"), - sonyIfdId, makerTags, asciiString, printValue), + sony1IfdId, makerTags, asciiString, printValue), TagInfo(0x2004, "0x2004", "0x2004", N_("Unknown"), - sonyIfdId, makerTags, signedLong, printValue), + sony1IfdId, makerTags, signedLong, printValue), TagInfo(0x2005, "0x2005", "0x2005", N_("Unknown"), - sonyIfdId, makerTags, signedLong, printValue), + sony1IfdId, makerTags, signedLong, printValue), TagInfo(0x2006, "0x2006", "0x2006", N_("Unknown"), - sonyIfdId, makerTags, signedLong, printValue), + sony1IfdId, makerTags, signedLong, printValue), TagInfo(0x2007, "0x2007", "0x2007", N_("Unknown"), - sonyIfdId, makerTags, signedLong, printValue), + sony1IfdId, makerTags, signedLong, printValue), TagInfo(0x2008, "0x2008", "0x2008", N_("Unknown"), - sonyIfdId, makerTags, signedLong, printValue), + sony1IfdId, makerTags, signedLong, printValue), TagInfo(0x2009, "0x2009", "0x2009", N_("Unknown"), - sonyIfdId, makerTags, unsignedShort, printValue), + sony1IfdId, makerTags, unsignedShort, printValue), TagInfo(0x200A, "AutoHDR", N_("Auto HDR"), N_("Auto High Definition Range"), - sonyIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(sonyAutoHDR)), + sony1IfdId, makerTags, unsignedLong, EXV_PRINT_TAG(sonyAutoHDR)), TagInfo(0x3000, "ShotInfo", N_("Shot Info"), N_("Shot Information"), - sonyIfdId, makerTags, undefined, printValue), + sony1IfdId, makerTags, undefined, printValue), TagInfo(0xb000, "FileFormat", N_("File Format"), N_("File Format"), - sonyIfdId, makerTags, unsignedByte, print0xb000), + sony1IfdId, makerTags, unsignedByte, print0xb000), TagInfo(0xb001, "SonyModelID", N_("Sony Model ID"), N_("Sony Model ID"), - sonyIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(sonyModelId)), + sony1IfdId, makerTags, unsignedShort, EXV_PRINT_TAG(sonyModelId)), TagInfo(0xb020, "ColorReproduction", N_("Color Reproduction"), N_("Color Reproduction"), - sonyIfdId, makerTags, asciiString, printValue), + sony1IfdId, makerTags, asciiString, printValue), TagInfo(0xb021, "ColorTemperature", N_("Color Temperature"), N_("Color Temperature"), - sonyIfdId, makerTags, unsignedLong, printValue), + sony1IfdId, makerTags, unsignedLong, printValue), TagInfo(0xb022, "ColorCompensationFilter", N_("Color Compensation Filter"), N_("Color Compensation Filter: negative is green, positive is magenta"), - sonyIfdId, makerTags, unsignedLong, printValue), + sony1IfdId, makerTags, unsignedLong, printValue), TagInfo(0xb023, "SceneMode", N_("Scene Mode"), N_("Scene Mode"), - sonyIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(sonySceneMode)), + sony1IfdId, makerTags, unsignedLong, EXV_PRINT_TAG(sonySceneMode)), TagInfo(0xb024, "ZoneMatching", N_("Zone Matching"), N_("Zone Matching"), - sonyIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(sonyZoneMatching)), + sony1IfdId, makerTags, unsignedLong, EXV_PRINT_TAG(sonyZoneMatching)), TagInfo(0xb025, "DynamicRangeOptimizer", N_("Dynamic Range Optimizer"), N_("Dynamic Range Optimizer"), - sonyIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(print0xb025)), + sony1IfdId, makerTags, unsignedLong, EXV_PRINT_TAG(print0xb025)), TagInfo(0xb026, "ImageStabilization", N_("Image Stabilization"), N_("Image stabilization"), - sonyIfdId, makerTags, unsignedLong, printMinoltaSonyBoolValue), + sony1IfdId, makerTags, unsignedLong, printMinoltaSonyBoolValue), TagInfo(0xb027, "LensID", N_("Lens ID"), N_("Lens identifier"), - sonyIfdId, makerTags, unsignedLong, printMinoltaSonyLensID), + sony1IfdId, makerTags, unsignedLong, printMinoltaSonyLensID), TagInfo(0xb028, "MinoltaMakerNote", N_("Minolta MakerNote"), N_("Minolta MakerNote"), - sonyIfdId, makerTags, undefined, printValue), + sony1IfdId, makerTags, undefined, printValue), TagInfo(0xb029, "ColorMode", N_("Color Mode"), N_("Color Mode"), - sonyIfdId, makerTags, unsignedLong, printMinoltaSonyBoolValue), + sony1IfdId, makerTags, unsignedLong, printMinoltaSonyBoolValue), TagInfo(0xb02b, "FullImageSize", N_("Full Image Size"), N_("Full Image Size"), - sonyIfdId, makerTags, unsignedLong, printImageSize), + sony1IfdId, makerTags, unsignedLong, printImageSize), TagInfo(0xb02c, "PreviewImageSize", N_("Preview Image Size"), N_("Preview Image Size"), - sonyIfdId, makerTags, unsignedLong, printImageSize), + sony1IfdId, makerTags, unsignedLong, printImageSize), TagInfo(0xb040, "Macro", N_("Macro"), N_("Macro"), - sonyIfdId, makerTags, unsignedShort, printMinoltaSonyBoolValue), + sony1IfdId, makerTags, unsignedShort, printMinoltaSonyBoolValue), TagInfo(0xb041, "ExposureMode", N_("Exposure Mode"), N_("Exposure Mode"), - sonyIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(sonyExposureMode)), + sony1IfdId, makerTags, unsignedShort, EXV_PRINT_TAG(sonyExposureMode)), TagInfo(0xb047, "Quality", N_("Quality"), N_("Quality"), - sonyIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(sonyQuality)), + sony1IfdId, makerTags, unsignedShort, EXV_PRINT_TAG(sonyQuality)), TagInfo(0xb04b, "AntiBlur", N_("Anti-Blur"), N_("Anti-Blur"), - sonyIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(sonyAntiBlur)), + sony1IfdId, makerTags, unsignedShort, EXV_PRINT_TAG(sonyAntiBlur)), TagInfo(0xb04e, "LongExposureNoiseReduction", N_("Long Exposure Noise Reduction"), N_("Long Exposure Noise Reduction"), - sonyIfdId, makerTags, unsignedShort, printMinoltaSonyBoolValue), + sony1IfdId, makerTags, unsignedShort, printMinoltaSonyBoolValue), TagInfo(0xb04f, "DynamicRangeOptimizer", N_("Dynamic Range Optimizer"), N_("Dynamic Range Optimizer"), - sonyIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(print0xb04f)), + sony1IfdId, makerTags, unsignedShort, EXV_PRINT_TAG(print0xb04f)), TagInfo(0xb052, "IntelligentAuto", N_("Intelligent Auto"), N_("Intelligent Auto"), - sonyIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(sonyIntelligentAuto)), + sony1IfdId, makerTags, unsignedShort, EXV_PRINT_TAG(sonyIntelligentAuto)), TagInfo(0xb054, "WhiteBalance", N_("White Balance"), N_("White Balance"), - sonyIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(sonyWhiteBalance)), + sony1IfdId, makerTags, unsignedShort, EXV_PRINT_TAG(sonyWhiteBalance)), // End of list marker - TagInfo(0xffff, "(UnknownSonyMakerNoteTag)", "(UnknownSonyMakerNoteTag)", - N_("Unknown SonyMakerNote tag"), - sonyIfdId, makerTags, invalidTypeId, printValue) + TagInfo(0xffff, "(UnknownSony1MakerNoteTag)", "(UnknownSony1MakerNoteTag)", + N_("Unknown Sony1MakerNote tag"), + sony1IfdId, makerTags, invalidTypeId, printValue) }; const TagInfo* SonyMakerNote::tagList() @@ -382,133 +381,130 @@ namespace Exiv2 { // Sony Camera Settings Tag Info // NOTE: all are for A200, A230, A300, A350, A700, A850 and A900 Sony model excepted // some entries which are only relevant with A700. - const TagInfo SonyMakerNote::tagInfoCs_[] = { - // NOTE: A700 only TagInfo(0x0004, "DriveMode", N_("Drive Mode"), N_("Drive Mode"), - sonyCsIfdId, makerTags, unsignedShort, printValue), - + sony1CsIfdId, makerTags, unsignedShort, printValue), // NOTE: A700 only TagInfo(0x0006, "WhiteBalanceFineTune", N_("White Balance Fine Tune"), N_("White Balance Fine Tune"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0016, "FocusMode", N_("Focus Mode"), N_("Focus Mode"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0017, "AFAreaMode", N_("AF Area Mode"), N_("AF Area Mode"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0018, "LocalAFAreaPoint", N_("Local AF Area Point"), N_("Local AF Area Point"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0021, "MeteringMode", N_("Metering Mode"), N_("Metering Mode"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0022, "ISOSetting", N_("ISO Setting"), N_("ISO Setting"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0024, "DynamicRangeOptimizerMode", N_("Dynamic Range Optimizer Mode"), N_("Dynamic Range Optimizer Mode"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0025, "DynamicRangeOptimizerLevel", N_("Dynamic Range Optimizer Level"), N_("Dynamic Range Optimizer Level"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0026, "CreativeStyle", N_("Creative Style"), N_("Creative Style"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0028, "Sharpness", N_("Sharpness"), N_("Sharpness"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0029, "Contrast", N_("Contrast"), N_("Contrast"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0030, "Saturation", N_("Saturation"), N_("Saturation"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0031, "ZoneMatchingValue", N_("Zone Matching Value"), N_("Zone Matching Value"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0034, "Brightness", N_("Brightness"), N_("Brightness"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0035, "FlashMode", N_("FlashMode"), N_("FlashMode"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), // NOTE: A700 only TagInfo(0x0040, "PrioritySetupShutterRelease", N_("Priority Setup Shutter Release"), N_("Priority Setup Shutter Release"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), // NOTE: A700 only TagInfo(0x0041, "AFIlluminator", N_("AF Illuminator"), N_("AF Illuminator"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), // NOTE: A700 only TagInfo(0x0042, "AFWithShutter", N_("AF With Shutter"), N_("AF With Shutter"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), // NOTE: A700 only TagInfo(0x0043, "LongExposureNoiseReduction", N_("Long Exposure Noise Reduction"), N_("Long Exposure Noise Reduction"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), // NOTE: A700 only TagInfo(0x0044, "HighISONoiseReduction", N_("High ISO NoiseReduction"), N_("High ISO NoiseReduction"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), // NOTE: A700 only TagInfo(0x0045, "ImageStyle", N_("Image Style"), N_("Image Style"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0060, "ExposureProgram", N_("Exposure Program"), N_("Exposure Program"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0061, "ImageStabilization", N_("Image Stabilization"), N_("Image Stabilization"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0063, "Rotation", N_("Rotation"), N_("Rotation"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0084, "SonyImageSize", N_("Sony Image Size"), N_("Sony Image Size"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0085, "AspectRatio", N_("Aspect Ratio"), N_("Aspect Ratio"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0086, "Quality", N_("Quality"), N_("Quality"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), TagInfo(0x0088, "ExposureLevelIncrements", N_("Exposure Level Increments"), N_("Exposure Level Increments"), - sonyCsIfdId, makerTags, unsignedShort, printValue), + sony1CsIfdId, makerTags, unsignedShort, printValue), // End of list marker - TagInfo(0xffff, "(UnknownSonyCsTag)", "(UnknownSonyCsTag)", - N_("Unknown Sony Camera Settings tag"), - sonyCsIfdId, makerTags, invalidTypeId, printValue) + TagInfo(0xffff, "(UnknownSony1CsTag)", "(UnknownSony1CsTag)", + N_("Unknown Sony1 Camera Settings tag"), + sony1CsIfdId, makerTags, invalidTypeId, printValue) }; const TagInfo* SonyMakerNote::tagListCs() @@ -525,66 +521,66 @@ namespace Exiv2 { TagInfo(0x0016, "FocusMode", N_("Focus Mode"), N_("Focus Mode"), - sonyCs2IfdId, makerTags, unsignedShort, printValue), + sony1Cs2IfdId, makerTags, unsignedShort, printValue), TagInfo(0x0017, "AFAreaMode", N_("AF Area Mode"), N_("AF Area Mode"), - sonyCs2IfdId, makerTags, unsignedShort, printValue), + sony1Cs2IfdId, makerTags, unsignedShort, printValue), TagInfo(0x0018, "LocalAFAreaPoint", N_("Local AF Area Point"), N_("Local AF Area Point"), - sonyCs2IfdId, makerTags, unsignedShort, printValue), + sony1Cs2IfdId, makerTags, unsignedShort, printValue), TagInfo(0x0019, "MeteringMode", N_("Metering Mode"), N_("Metering Mode"), - sonyCs2IfdId, makerTags, unsignedShort, printValue), + sony1Cs2IfdId, makerTags, unsignedShort, printValue), TagInfo(0x0020, "ISOSetting", N_("ISO Setting"), N_("ISO Setting"), - sonyCs2IfdId, makerTags, unsignedShort, printValue), + sony1Cs2IfdId, makerTags, unsignedShort, printValue), TagInfo(0x0022, "DynamicRangeOptimizerMode", N_("Dynamic Range Optimizer Mode"), N_("Dynamic Range Optimizer Mode"), - sonyCs2IfdId, makerTags, unsignedShort, printValue), + sony1Cs2IfdId, makerTags, unsignedShort, printValue), TagInfo(0x0023, "DynamicRangeOptimizerLevel", N_("Dynamic Range Optimizer Level"), N_("Dynamic Range Optimizer Level"), - sonyCs2IfdId, makerTags, unsignedShort, printValue), + sony1Cs2IfdId, makerTags, unsignedShort, printValue), TagInfo(0x0024, "CreativeStyle", N_("Creative Style"), N_("Creative Style"), - sonyCs2IfdId, makerTags, unsignedShort, printValue), + sony1Cs2IfdId, makerTags, unsignedShort, printValue), TagInfo(0x0025, "Sharpness", N_("Sharpness"), N_("Sharpness"), - sonyCs2IfdId, makerTags, unsignedShort, printValue), + sony1Cs2IfdId, makerTags, unsignedShort, printValue), TagInfo(0x0026, "Contrast", N_("Contrast"), N_("Contrast"), - sonyCs2IfdId, makerTags, unsignedShort, printValue), + sony1Cs2IfdId, makerTags, unsignedShort, printValue), TagInfo(0x0027, "Saturation", N_("Saturation"), N_("Saturation"), - sonyCs2IfdId, makerTags, unsignedShort, printValue), + sony1Cs2IfdId, makerTags, unsignedShort, printValue), TagInfo(0x0035, "FlashMode", N_("FlashMode"), N_("FlashMode"), - sonyCs2IfdId, makerTags, unsignedShort, printValue), + sony1Cs2IfdId, makerTags, unsignedShort, printValue), TagInfo(0x0060, "ExposureProgram", N_("Exposure Program"), N_("Exposure Program"), - sonyCs2IfdId, makerTags, unsignedShort, printValue), + sony1Cs2IfdId, makerTags, unsignedShort, printValue), TagInfo(0x0063, "Rotation", N_("Rotation"), N_("Rotation"), - sonyCs2IfdId, makerTags, unsignedShort, printValue), + sony1Cs2IfdId, makerTags, unsignedShort, printValue), TagInfo(0x0084, "SonyImageSize", N_("Sony Image Size"), N_("Sony Image Size"), - sonyCs2IfdId, makerTags, unsignedShort, printValue), + sony1Cs2IfdId, makerTags, unsignedShort, printValue), // End of list marker - TagInfo(0xffff, "(UnknownSonyCsTag)", "(UnknownSonyCsTag)", - N_("Unknown Sony Camera Settings tag"), - sonyCs2IfdId, makerTags, invalidTypeId, printValue) + TagInfo(0xffff, "(UnknownSony1Cs2Tag)", "(UnknownSony1Cs2Tag)", + N_("Unknown Sony1 Camera Settings 2 tag"), + sony1Cs2IfdId, makerTags, invalidTypeId, printValue) }; const TagInfo* SonyMakerNote::tagListCs2() diff --git a/src/tags.cpp b/src/tags.cpp index c50e0649..c4290e87 100644 --- a/src/tags.cpp +++ b/src/tags.cpp @@ -170,10 +170,16 @@ namespace Exiv2 { { panaRawIfdId, "PanaRaw", "PanasonicRaw", PanasonicMakerNote::tagListRaw }, { pentaxIfdId, "Makernote", "Pentax", PentaxMakerNote::tagList }, { sigmaIfdId, "Makernote", "Sigma", SigmaMakerNote::tagList }, - { sonyIfdId, "Makernote", "Sony", SonyMakerNote::tagList }, + { sony1IfdId, "Makernote", "Sony1", SonyMakerNote::tagList }, + { sony2IfdId, "Makernote", "Sony2", SonyMakerNote::tagList }, { sonyMltIfdId, "Makernote", "SonyMinolta", MinoltaMakerNote::tagList }, - { sonyCsIfdId, "Makernote", "SonyCs", SonyMakerNote::tagListCs }, - { sonyCs2IfdId, "Makernote", "SonyCs2", SonyMakerNote::tagListCs2 }, + { sony1CsIfdId, "Makernote", "Sony1Cs", SonyMakerNote::tagListCs }, + { sony1Cs2IfdId, "Makernote", "Sony1Cs2", SonyMakerNote::tagListCs2 }, + { sony1MltCs5DIfdId, "Makernote", "Sony1MltCs5D", MinoltaMakerNote::tagListCs5D }, + { sony1MltCs7DIfdId, "Makernote", "Sony1MltCs7D", MinoltaMakerNote::tagListCs7D }, + { sony1MltCsOldIfdId,"Makernote", "Sony1MltCsOld",MinoltaMakerNote::tagListCsStd }, + { sony1MltCsNewIfdId,"Makernote", "Sony1MltCsNew",MinoltaMakerNote::tagListCsStd }, + { sony2CsIfdId, "Makernote", "Sony2Cs", SonyMakerNote::tagListCs }, { lastIfdId, "(Last IFD info)", "(Last IFD item)", 0 } }; diff --git a/src/tiffcomposite.cpp b/src/tiffcomposite.cpp index 75f83f1a..dce30e84 100644 --- a/src/tiffcomposite.cpp +++ b/src/tiffcomposite.cpp @@ -73,7 +73,8 @@ namespace Exiv2 { }; // Todo: This mapping table probably belongs somewhere else - move it - // Note: Names must be unique! + // Note: Names must be unique and match those in the third column of + // ExifTags::ifdInfo_[] (tags.cpp)! //! List of groups and their names. extern const TiffGroupInfo tiffGroupInfo[] = { { 1, "Image" }, @@ -107,8 +108,8 @@ namespace Exiv2 { { 267, "Panasonic" }, { 268, "Sigma" }, // 269 not needed (sonymn) - { 270, "Sony" }, - { 271, "Sony" }, // Todo: Need second Sony group! + { 270, "Sony1" }, + { 271, "Sony2" }, { 272, "Minolta" }, { 273, "MinoltaCsOld" }, { 274, "MinoltaCsNew" }, @@ -158,7 +159,13 @@ namespace Exiv2 { { 318, "NikonSi01xx" }, { 320, "CanonFi" }, { 330, "SonyMinolta" }, - { 331, "SonyCs" } + { 331, "Sony1Cs" }, + { 332, "Sony2Cs" }, + { 333, "Sony1MltCsOld"}, + { 334, "Sony1MltCsNew"}, + { 335, "Sony1MltCs5D" }, + { 336, "Sony1MltCs7D" }, + { 337, "Sony1Cs2" } }; bool TiffGroupInfo::operator==(const uint16_t& group) const diff --git a/src/tiffimage.cpp b/src/tiffimage.cpp index af2389e7..f69671b8 100644 --- a/src/tiffimage.cpp +++ b/src/tiffimage.cpp @@ -794,9 +794,20 @@ namespace Exiv2 { { 146, ttSignedShort, 1 } // Exif.MinoltaCs5D.ColorTemperature }; - //! Sony Camera Settings binary array - configuration - extern const ArrayCfg sonyCsCfg = { - Group::sonycs, // Group for the elements + //! Sony1 Camera Settings binary array - configuration + extern const ArrayCfg sony1CsCfg = { + Group::sony1cs, // Group for the elements + bigEndian, // Big endian + ttUndefined, // Type for array entry and size element + notEncrypted, // Not encrypted + false, // No size element + false, // No fillers + false, // Don't concatenate gaps + { 0, ttUnsignedShort, 1 } + }; + //! Sony2 Camera Settings binary array - configuration + extern const ArrayCfg sony2CsCfg = { + Group::sony2cs, // Group for the elements bigEndian, // Big endian ttUndefined, // Type for array entry and size element notEncrypted, // Not encrypted @@ -807,13 +818,13 @@ namespace Exiv2 { }; //! Sony Camera Settings binary array - definition extern const ArrayDef sonyCsDef[] = { - { 6, ttUnsignedShort, 1 }, // Exif.SonyCs.DriveMode - { 10, ttSignedShort, 1 } // Exif.SonyCs.WhiteBalanceFineTune + { 6, ttUnsignedShort, 1 }, // Exif.Sony1Cs.DriveMode + { 10, ttSignedShort, 1 } // Exif.Sony1Cs.WhiteBalanceFineTune }; - //! Sony Camera Settings binary array - configuration - extern const ArrayCfg sonyCs2Cfg = { - Group::sonycs2, // Group for the elements + //! Sony1 Camera Settings 2 binary array - configuration + extern const ArrayCfg sony1Cs2Cfg = { + Group::sony1cs2, // Group for the elements bigEndian, // Big endian ttUndefined, // Type for array entry and size element notEncrypted, // Not encrypted @@ -822,10 +833,58 @@ namespace Exiv2 { false, // Don't concatenate gaps { 0, ttUnsignedShort, 1 } }; - //! Sony Camera Settings binary array - definition + //! Sony Camera Settings 2 binary array - definition extern const ArrayDef sonyCs2Def[] = { - { 6, ttUnsignedShort, 1 }, // Exif.SonyCs2.DriveMode - { 10, ttSignedShort, 1 } // Exif.SonyCs2.WhiteBalanceFineTune + { 6, ttUnsignedShort, 1 }, // Exif.Sony1Cs2.DriveMode + { 10, ttSignedShort, 1 } // Exif.Sony1Cs2.WhiteBalanceFineTune + }; + + //! Sony Minolta Camera Settings (old) binary array - configuration + extern const ArrayCfg sony1MCsoCfg = { + Group::sony1mcso, // Group for the elements + bigEndian, // Big endian + ttUndefined, // Type for array entry and size element + notEncrypted, // Not encrypted + false, // No size element + false, // No fillers + false, // Don't concatenate gaps + { 0, ttUnsignedLong, 1 } + }; + + //! Sony Minolta Camera Settings (new) binary array - configuration + extern const ArrayCfg sony1MCsnCfg = { + Group::sony1mcsn, // Group for the elements + bigEndian, // Big endian + ttUndefined, // Type for array entry and size element + notEncrypted, // Not encrypted + false, // No size element + false, // No fillers + false, // Don't concatenate gaps + { 0, ttUnsignedLong, 1 } + }; + + //! Sony Minolta 7D Camera Settings binary array - configuration + extern const ArrayCfg sony1MCs7Cfg = { + Group::sony1mcs7, // Group for the elements + bigEndian, // Big endian + ttUndefined, // Type for array entry and size element + notEncrypted, // Not encrypted + false, // No size element + false, // No fillers + false, // Don't concatenate gaps + { 0, ttUnsignedShort, 1 } + }; + + //! Sony Minolta 5D Camera Settings binary array - configuration + extern const ArrayCfg sony1MCs5Cfg = { + Group::sony1mcs5, // Group for the elements + bigEndian, // Big endian + ttUndefined, // Type for array entry and size element + notEncrypted, // Not encrypted + false, // No size element + false, // No fillers + false, // Don't concatenate gaps + { 0, ttUnsignedShort, 1 } }; /* @@ -911,9 +970,15 @@ namespace Exiv2 { { Tag::root, Group::pentaxmn, Group::exif, 0x927c }, { Tag::root, Group::sigmamn, Group::exif, 0x927c }, { Tag::root, Group::sony1mn, Group::exif, 0x927c }, - { Tag::root, Group::sonycs, Group::sony1mn, 0x0114 }, + { Tag::root, Group::sony1cs, Group::sony1mn, 0x0114 }, + { Tag::root, Group::sony1cs2, Group::sony1mn, 0x0114 }, { Tag::root, Group::sonymltmn, Group::sony1mn, 0xb028 }, + { Tag::root, Group::sony1mcso, Group::sonymltmn, 0x0001 }, + { Tag::root, Group::sony1mcsn, Group::sonymltmn, 0x0003 }, + { Tag::root, Group::sony1mcs7, Group::sonymltmn, 0x0004 }, + { Tag::root, Group::sony1mcs5, Group::sonymltmn, 0x0114 }, { Tag::root, Group::sony2mn, Group::exif, 0x927c }, + { Tag::root, Group::sony2cs, Group::sony2mn, 0x0114 }, { Tag::root, Group::minoltamn, Group::exif, 0x927c }, { Tag::root, Group::minocso, Group::minoltamn, 0x0001 }, { Tag::root, Group::minocsn, Group::minoltamn, 0x0003 }, @@ -1270,26 +1335,39 @@ namespace Exiv2 { { Tag::all, Group::sigmamn, newTiffEntry }, // Sony1 makernote - { Tag::next, Group::sony1mn, newTiffDirectory }, - { 0x0114, Group::sony1mn, EXV_BINARY_ARRAY(sonyCsCfg, sonyCsDef) }, - { 0x0114, Group::sony1mn, EXV_BINARY_ARRAY(sonyCs2Cfg, sonyCs2Def) }, + { 0x0114, Group::sony1mn, EXV_BINARY_ARRAY(sony1CsCfg, sonyCsDef) }, { 0xb028, Group::sony1mn, newTiffSubIfd }, + { Tag::next, Group::sony1mn, newTiffDirectory }, { Tag::all, Group::sony1mn, newTiffEntry }, // Sony1 camera settings - { Tag::all, Group::sonycs, newTiffBinaryElement }, + { Tag::all, Group::sony1cs, newTiffBinaryElement }, + { Tag::all, Group::sony1cs2, newTiffBinaryElement }, // Sony2 makernote + { 0x0114, Group::sony2mn, EXV_BINARY_ARRAY(sony2CsCfg, sonyCsDef) }, { Tag::next, Group::sony2mn, newTiffDirectory }, - { 0x0114, Group::sony2mn, EXV_BINARY_ARRAY(sonyCsCfg, sonyCsDef) }, - { 0x0114, Group::sony2mn, EXV_BINARY_ARRAY(sonyCs2Cfg, sonyCs2Def) }, - { 0xb028, Group::sony2mn, newTiffSubIfd }, { Tag::all, Group::sony2mn, newTiffEntry }, - // Sony Minolta makernote + // Sony2 camera settings + { Tag::all, Group::sony2cs, newTiffBinaryElement }, + + // Sony1 Minolta makernote + { 0x0001, Group::sonymltmn, EXV_SIMPLE_BINARY_ARRAY(sony1MCsoCfg) }, + { 0x0003, Group::sonymltmn, EXV_SIMPLE_BINARY_ARRAY(sony1MCsnCfg) }, + { 0x0004, Group::sonymltmn, EXV_BINARY_ARRAY(sony1MCs7Cfg, minoCs7Def)}, // minoCs7Def [sic] + { 0x0088, Group::sonymltmn, newTiffThumbData<0x0089, Group::sonymltmn>}, + { 0x0089, Group::sonymltmn, newTiffThumbSize<0x0088, Group::sonymltmn>}, + { 0x0114, Group::sonymltmn, EXV_BINARY_ARRAY(sony1MCs5Cfg, minoCs5Def)}, // minoCs5Def [sic] { Tag::next, Group::sonymltmn, newTiffDirectory }, { Tag::all, Group::sonymltmn, newTiffEntry }, + // Sony1 Minolta makernote composite tags + { Tag::all, Group::sony1mcso, newTiffBinaryElement }, + { Tag::all, Group::sony1mcsn, newTiffBinaryElement }, + { Tag::all, Group::sony1mcs7, newTiffBinaryElement }, + { Tag::all, Group::sony1mcs5, newTiffBinaryElement }, + // Minolta makernote { 0x0001, Group::minoltamn, EXV_SIMPLE_BINARY_ARRAY(minoCsoCfg) }, { 0x0003, Group::minoltamn, EXV_SIMPLE_BINARY_ARRAY(minoCsnCfg) }, diff --git a/src/types.hpp b/src/types.hpp index 8b70010e..73bdd04b 100644 --- a/src/types.hpp +++ b/src/types.hpp @@ -223,10 +223,16 @@ namespace Exiv2 { panaRawIfdId, pentaxIfdId, sigmaIfdId, - sonyIfdId, + sony1IfdId, + sony2IfdId, sonyMltIfdId, - sonyCsIfdId, - sonyCs2IfdId, + sony1CsIfdId, + sony1Cs2IfdId, + sony2CsIfdId, + sony1MltCs5DIfdId, + sony1MltCs7DIfdId, + sony1MltCsOldIfdId, + sony1MltCsNewIfdId, lastIfdId };