<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">diff --git a/src/Exif/ExifOperations.cpp b/src/Exif/ExifOperations.cpp
index dd3d22a6..4cfe6b70 100644
--- a/src/Exif/ExifOperations.cpp
+++ b/src/Exif/ExifOperations.cpp
@@ -108,7 +108,11 @@ void copyExifData(const std::string &amp;from, const std::string &amp;to,
 #endif
 
     try {
+#if EXIV2_TEST_VERSION (0, 28, 0)
+        Exiv2::Image::UniquePtr sourceImage;
+#else
         Exiv2::Image::AutoPtr sourceImage;
+#endif
         Exiv2::ExifData srcExifData;
 
         if (!from.empty()) {
@@ -128,7 +132,11 @@ void copyExifData(const std::string &amp;from, const std::string &amp;to,
         }
 
         // get destination exif data
+#if EXIV2_TEST_VERSION (0, 28, 0)
+        Exiv2::Image::UniquePtr destinationImage = Exiv2::ImageFactory::open(to);
+#else
         Exiv2::Image::AutoPtr destinationImage = Exiv2::ImageFactory::open(to);
+#endif
 
         if (dontOverwrite) {
             // doesn't throw anything if it is empty
@@ -212,7 +220,11 @@ void copyExifData(const std::string &amp;from, const std::string &amp;to,
             destinationImage-&gt;setExifData(srcExifData);
         }
         destinationImage-&gt;writeMetadata();
+#if EXIV2_TEST_VERSION (0, 28, 0)
+    } catch (Exiv2::Error &amp;e) {
+#else
     } catch (Exiv2::AnyError &amp;e) {
+#endif
 #ifndef NDEBUG
         qDebug() &lt;&lt; e.what();
 #endif
@@ -338,7 +350,11 @@ allowed for ev computation purposes.
 
 float getExposureTime(const std::string &amp;filename) {
     try {
+#if EXIV2_TEST_VERSION (0, 28, 0)
+        Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open(filename);
+#else
         Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename);
+#endif
         image-&gt;readMetadata();
         Exiv2::ExifData &amp;exifData = image-&gt;exifData();
         if (exifData.empty()) return -1;
@@ -374,14 +390,22 @@ float getExposureTime(const std::string &amp;filename) {
         } else {
             return -1;
         }
+#if EXIV2_TEST_VERSION (0, 28, 0)
+    } catch (Exiv2::Error &amp;e) {
+#else
     } catch (Exiv2::AnyError &amp;e) {
+#endif
         return -1;
     }
 }
 
 float getAverageLuminance(const std::string &amp;filename) {
     try {
+#if EXIV2_TEST_VERSION (0, 28, 0)
+        Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open(filename);
+#else
         Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename);
+#endif
         image-&gt;readMetadata();
         Exiv2::ExifData &amp;exifData = image-&gt;exifData();
 
@@ -403,7 +427,11 @@ float getAverageLuminance(const std::string &amp;filename) {
                   &lt;&lt; std::endl;
 
         return -1.0;
+#if EXIV2_TEST_VERSION (0, 28, 0)
+    } catch (Exiv2::Error &amp;e) {
+#else
     } catch (Exiv2::AnyError &amp;e) {
+#endif
         return -1.0;
     }
 }
diff --git a/src/Libpfs/exif/exifdata.cpp b/src/Libpfs/exif/exifdata.cpp
index 38472eff..79085e43 100644
--- a/src/Libpfs/exif/exifdata.cpp
+++ b/src/Libpfs/exif/exifdata.cpp
@@ -52,7 +52,11 @@ ExifData::ExifData(const std::string &amp;filename) { fromFile(filename); }
 void ExifData::fromFile(const std::string &amp;filename) {
     reset();
     try {
+#if EXIV2_TEST_VERSION (0, 28, 0)
+        ::Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open(filename);
+#else
         ::Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename);
+#endif
         image-&gt;readMetadata();
         ::Exiv2::ExifData &amp;exifData = image-&gt;exifData();
 
@@ -121,7 +125,11 @@ void ExifData::fromFile(const std::string &amp;filename) {
          */
         if ((it = exifData.findKey(Exiv2::ExifKey("Exif.Image.Orientation"))) !=
             exifData.end()) {
+#if EXIV2_TEST_VERSION (0, 28, 0)
+            long rotation = it-&gt;toUint32();
+#else
             long rotation = it-&gt;toLong();
+#endif
             switch (rotation) {
                 case 3:
                     m_orientation = 180;
@@ -134,7 +142,11 @@ void ExifData::fromFile(const std::string &amp;filename) {
                     break;
             }
         }
+#if EXIV2_TEST_VERSION (0, 28, 0)
+    } catch (Exiv2::Error &amp;e) {
+#else
     } catch (Exiv2::AnyError &amp;e) {
+#endif
         return;
     }
 }
diff --git a/src/TransplantExif/TransplantExifDialog.cpp b/src/TransplantExif/TransplantExifDialog.cpp
index 8364b595..a7683703 100644
--- a/src/TransplantExif/TransplantExifDialog.cpp
+++ b/src/TransplantExif/TransplantExifDialog.cpp
@@ -347,7 +347,11 @@ void TransplantExifDialog::transplant_requested() {
                 QFile::encodeName((*i_dest)).constData(),
                 m_Ui-&gt;checkBox_dont_overwrite-&gt;isChecked());
             m_Ui-&gt;rightlist-&gt;item(index)-&gt;setBackground(QBrush("#a0ff87"));
+#if EXIV2_TEST_VERSION (0, 28, 0)
+        } catch (Exiv2::Error &amp;e) {
+#else
         } catch (Exiv2::AnyError &amp;e) {
+#endif
             add_log_message("ERROR:" + QString::fromStdString(e.what()));
             m_Ui-&gt;rightlist-&gt;item(index)-&gt;setBackground(QBrush("#ff743d"));
         }
</pre></body></html>