View | Details | Raw Unified | Return to bug 272311 | Differences between
and this patch

Collapse All | Expand All

(-)b/graphics/luminance-qt5/Makefile (-1 / +1 lines)
Lines 1-6 Link Here
1
PORTNAME=	luminance-hdr
1
PORTNAME=	luminance-hdr
2
DISTVERSION=	2.6.1.1
2
DISTVERSION=	2.6.1.1
3
PORTREVISION=	20
3
PORTREVISION=	21
4
CATEGORIES=	graphics
4
CATEGORIES=	graphics
5
MASTER_SITES=	SF/qtpfsgui/luminance/${DISTVERSION}
5
MASTER_SITES=	SF/qtpfsgui/luminance/${DISTVERSION}
6
6
(-)b/graphics/luminance-qt5/files/patch-src_Exif_ExifOperations.cpp (+88 lines)
Added Link Here
1
--- src/Exif/ExifOperations.cpp.orig	2021-01-11 09:41:28 UTC
2
+++ src/Exif/ExifOperations.cpp
3
@@ -108,12 +108,12 @@ void copyExifData(const std::string &from, const std::
4
 #endif
5
 
6
     try {
7
-        Exiv2::Image::AutoPtr sourceImage;
8
+        Exiv2::Image::UniquePtr sourceImage;
9
         Exiv2::ExifData srcExifData;
10
 
11
         if (!from.empty()) {
12
             // get source exif data
13
-            sourceImage = Exiv2::ImageFactory::open(from);
14
+            sourceImage = std::move(Exiv2::ImageFactory::open(from));
15
 
16
             sourceImage->readMetadata();
17
             srcExifData = sourceImage->exifData();
18
@@ -128,7 +128,7 @@ void copyExifData(const std::string &from, const std::
19
         }
20
 
21
         // get destination exif data
22
-        Exiv2::Image::AutoPtr destinationImage = Exiv2::ImageFactory::open(to);
23
+        Exiv2::Image::UniquePtr destinationImage = Exiv2::ImageFactory::open(to);
24
 
25
         if (dontOverwrite) {
26
             // doesn't throw anything if it is empty
27
@@ -212,7 +212,7 @@ void copyExifData(const std::string &from, const std::
28
             destinationImage->setExifData(srcExifData);
29
         }
30
         destinationImage->writeMetadata();
31
-    } catch (Exiv2::AnyError &e) {
32
+    } catch (Exiv2::Error &e) {
33
 #ifndef NDEBUG
34
         qDebug() << e.what();
35
 #endif
36
@@ -250,7 +250,7 @@ float obtain_avg_lum(const std::string& filename)
37
 {
38
     try
39
     {
40
-        Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename);
41
+        Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open(filename);
42
         image->readMetadata();
43
         Exiv2::ExifData &exifData = image->exifData();
44
         if (exifData.empty())
45
@@ -329,7 +329,7 @@ allowed for ev computation purposes.
46
             return -1;
47
         }
48
     }
49
-    catch (Exiv2::AnyError& e)
50
+    catch (Exiv2::Error& e)
51
     {
52
         return -1;
53
     }
54
@@ -338,7 +338,7 @@ allowed for ev computation purposes.
55
 
56
 float getExposureTime(const std::string &filename) {
57
     try {
58
-        Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename);
59
+        Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open(filename);
60
         image->readMetadata();
61
         Exiv2::ExifData &exifData = image->exifData();
62
         if (exifData.empty()) return -1;
63
@@ -374,14 +374,14 @@ float getExposureTime(const std::string &filename) {
64
         } else {
65
             return -1;
66
         }
67
-    } catch (Exiv2::AnyError &e) {
68
+    } catch (Exiv2::Error &e) {
69
         return -1;
70
     }
71
 }
72
 
73
 float getAverageLuminance(const std::string &filename) {
74
     try {
75
-        Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename);
76
+        Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open(filename);
77
         image->readMetadata();
78
         Exiv2::ExifData &exifData = image->exifData();
79
 
80
@@ -403,7 +403,7 @@ float getAverageLuminance(const std::string &filename)
81
                   << std::endl;
82
 
83
         return -1.0;
84
-    } catch (Exiv2::AnyError &e) {
85
+    } catch (Exiv2::Error &e) {
86
         return -1.0;
87
     }
88
 }
(-)b/graphics/luminance-qt5/files/patch-src_Libpfs_exif_exifdata.cpp (+29 lines)
Added Link Here
1
--- src/Libpfs/exif/exifdata.cpp.orig	2021-01-11 09:41:28 UTC
2
+++ src/Libpfs/exif/exifdata.cpp
3
@@ -52,7 +52,7 @@ ExifData::ExifData(const std::string &filename) { from
4
 void ExifData::fromFile(const std::string &filename) {
5
     reset();
6
     try {
7
-        ::Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename);
8
+        ::Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open(filename);
9
         image->readMetadata();
10
         ::Exiv2::ExifData &exifData = image->exifData();
11
 
12
@@ -121,7 +121,7 @@ void ExifData::fromFile(const std::string &filename) {
13
          */
14
         if ((it = exifData.findKey(Exiv2::ExifKey("Exif.Image.Orientation"))) !=
15
             exifData.end()) {
16
-            long rotation = it->toLong();
17
+            long rotation = it->toInt64();
18
             switch (rotation) {
19
                 case 3:
20
                     m_orientation = 180;
21
@@ -134,7 +134,7 @@ void ExifData::fromFile(const std::string &filename) {
22
                     break;
23
             }
24
         }
25
-    } catch (Exiv2::AnyError &e) {
26
+    } catch (Exiv2::Error &e) {
27
         return;
28
     }
29
 }
(-)b/graphics/luminance-qt5/files/patch-src_TransplantExif_TransplantExifDialog.cpp (-1 / +11 lines)
Added Link Here
0
- 
1
--- src/TransplantExif/TransplantExifDialog.cpp.orig	2021-01-11 09:41:28 UTC
2
+++ src/TransplantExif/TransplantExifDialog.cpp
3
@@ -347,7 +347,7 @@ void TransplantExifDialog::transplant_requested() {
4
                 QFile::encodeName((*i_dest)).constData(),
5
                 m_Ui->checkBox_dont_overwrite->isChecked());
6
             m_Ui->rightlist->item(index)->setBackground(QBrush("#a0ff87"));
7
-        } catch (Exiv2::AnyError &e) {
8
+        } catch (Exiv2::Error &e) {
9
             add_log_message("ERROR:" + QString::fromStdString(e.what()));
10
             m_Ui->rightlist->item(index)->setBackground(QBrush("#ff743d"));
11
         }

Return to bug 272311