From 0b650334888c9c3b9828e2ce78c98a920b369de1 Mon Sep 17 00:00:00 2001 From: Andreas Huggel Date: Sun, 10 Jan 2010 16:00:09 +0000 Subject: [PATCH] #665: Quick-fix for the exiv2 utility to allow inserting Exif data into ORF files. --- src/actions.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/actions.cpp b/src/actions.cpp index 446fa898..3083d1ac 100644 --- a/src/actions.cpp +++ b/src/actions.cpp @@ -880,7 +880,9 @@ namespace Action { if (Params::instance().verbose_ && image->exifData().count() > 0) { std::cout << _("Erasing Exif data from the file") << std::endl; } - if (0 == strcmp(image->mimeType().c_str(), "image/tiff")) { + // Todo: ORF files are crippled after this. Find out exactly which tags are required + if ( 0 == strcmp(image->mimeType().c_str(), "image/tiff") + || 0 == strcmp(image->mimeType().c_str(), "image/x-olympus-orf")) { Exiv2::ExifData& ed = image->exifData(); ed.erase(std::remove_if(ed.begin(), ed.end(), isExifTag), ed.end()); } @@ -1739,7 +1741,8 @@ namespace { std::cout << _("Writing Exif data from") << " " << source << " " << _("to") << " " << target << std::endl; } - if (0 == strcmp(targetImage->mimeType().c_str(), "image/tiff")) { + if ( 0 == strcmp(targetImage->mimeType().c_str(), "image/tiff") + || 0 == strcmp(targetImage->mimeType().c_str(), "image/x-olympus-orf")) { Exiv2::ExifData& ted = targetImage->exifData(); if (!preserve) { targetImage->readMetadata();