1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
Patch originally taken from ArchLinux, modified to be backwards compatible.
diff -r 79cd11a7a66f src/hugin_base/panodata/Exiv2Helper.cpp
--- a/src/hugin_base/panodata/Exiv2Helper.cpp Wed May 24 19:13:20 2023 +0200
+++ b/src/hugin_base/panodata/Exiv2Helper.cpp Mon Jun 05 00:31:19 2023 +0200
@@ -40,7 +40,11 @@
Exiv2::ExifData::iterator itr = exifData.findKey(Exiv2::ExifKey(keyName));
if (itr != exifData.end() && itr->count())
{
+#if EXIV2_TEST_VERSION(0,28,0)
+ value = itr->toUint32();
+#else
value = itr->toLong();
+#endif
return true;
}
else
@@ -165,7 +169,11 @@
{
if(it!=exifData.end() && it->count())
{
+#if EXIV2_TEST_VERSION(0,28,0)
+ return it->toUint32();
+#else
return it->toLong();
+#endif
}
return 0;
};
@@ -600,4 +608,4 @@
};
}; //namespace Exiv2Helper
-}; //namespace HuginBase
\ No newline at end of file
+}; //namespace HuginBase
diff -r 79cd11a7a66f src/hugin_base/panodata/SrcPanoImage.cpp
--- a/src/hugin_base/panodata/SrcPanoImage.cpp Wed May 24 19:13:20 2023 +0200
+++ b/src/hugin_base/panodata/SrcPanoImage.cpp Mon Jun 05 00:31:19 2023 +0200
@@ -384,7 +384,11 @@
pos = xmpData.findKey(Exiv2::XmpKey("Xmp.GPano.CroppedAreaImageWidthPixels"));
if (pos != xmpData.end())
{
+#if EXIV2_TEST_VERSION(0,28,0)
+ croppedWidth = pos->toUint32();
+#else
croppedWidth = pos->toLong();
+#endif
}
else
{
@@ -394,7 +398,11 @@
pos = xmpData.findKey(Exiv2::XmpKey("Xmp.GPano.CroppedAreaImageHeightPixels"));
if (pos != xmpData.end())
{
+#if EXIV2_TEST_VERSION(0,28,0)
+ croppedHeight = pos->toUint32();
+#else
croppedHeight = pos->toLong();
+#endif
}
else
{
@@ -408,7 +416,11 @@
double hfov = 0;
if (pos != xmpData.end())
{
+#if EXIV2_TEST_VERSION(0,28,0)
+ hfov = 360 * croppedWidth / (double)pos->toUint32();
+#else
hfov = 360 * croppedWidth / (double)pos->toLong();
+#endif
}
else
{
@@ -419,7 +431,11 @@
pos = xmpData.findKey(Exiv2::XmpKey("Xmp.GPano.FullPanoHeightPixels"));
if (pos != xmpData.end())
{
+#if EXIV2_TEST_VERSION(0,28,0)
+ fullHeight = pos->toUint32();
+#else
fullHeight = pos->toLong();
+#endif
}
else
{
@@ -430,7 +446,11 @@
pos = xmpData.findKey(Exiv2::XmpKey("Xmp.GPano.CroppedAreaTopPixels"));
if (pos != xmpData.end())
{
+#if EXIV2_TEST_VERSION(0,28,0)
+ cropTop = pos->toUint32();
+#else
cropTop = pos->toLong();
+#endif
}
else
{
|