From f2248dce9dd71e03c379fd59bbb96a43f0e3329e Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Tue, 2 Nov 2021 22:05:47 +0100 Subject: [PATCH] metadata: detect pixelshift files from sony and fujifilm (cherry picked from commit 6554778f7bc6ce50c3bb8a98ca1907cb945c2e34) --- rtengine/imagedata.cc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/rtengine/imagedata.cc b/rtengine/imagedata.cc index 4772b2230..a1db3c8d3 100644 --- a/rtengine/imagedata.cc +++ b/rtengine/imagedata.cc @@ -424,6 +424,30 @@ FramesData::FramesData(const Glib::ustring &fname) : } } + if (make == "SONY") { + if (find_exif_tag("Exif.SubImage1.BitsPerSample") && pos->toLong() == 14) { + if (find_exif_tag("Exif.SubImage1.SamplesPerPixel") && pos->toLong() == 4 && + find_exif_tag("Exif.SubImage1.PhotometricInterpretation") && pos->toLong() == 32892 && + find_exif_tag("Exif.SubImage1.Compression") && pos->toLong() == 1) { + isPixelShift = true; + } + } else if (bps != exif.end() && bps->toLong() == 14 && + spp != exif.end() && spp->toLong() == 4 && + c != exif.end() && c->toLong() == 1 && + find_exif_tag("Exif.Image.Software") && + pos->toString() == "make_arq") { + isPixelShift = true; + } + } else if (make == "FUJIFILM") { + if (bps != exif.end() && bps->toLong() == 16 && + spp != exif.end() && spp->toLong() == 4 && + c != exif.end() && c->toLong() == 1 && + find_exif_tag("Exif.Image.Software") && + pos->toString() == "make_arq") { + isPixelShift = true; + } + } + sampleFormat = IIOSF_UNKNOWN; if (sf == exif.end())