summarylogtreecommitdiffstats
path: root/exiv2-error.patch
blob: 665221c58872c1840a205f6fcadb8c467dc1eb8c (plain)
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
diff --git a/nufraw_exiv2.cc b/nufraw_exiv2.cc
index 2de4cc3..45aea87 100644
--- a/nufraw_exiv2.cc
+++ b/nufraw_exiv2.cc
@@ -54,7 +54,7 @@ extern "C" int nufraw_exif_read_input(nufraw_data *uf)
         uf->inputExifBuf = NULL;
         uf->inputExifBufLen = 0;
 
-        Exiv2::Image::AutoPtr image;
+        Exiv2::Image::UniquePtr image;
         if (uf->unzippedBuf != NULL) {
             image = Exiv2::ImageFactory::open(
                         (const Exiv2::byte*)uf->unzippedBuf, uf->unzippedBufLen);
@@ -135,7 +135,7 @@ extern "C" int nufraw_exif_read_input(nufraw_data *uf)
         nufraw_message(NUFRAW_SET_LOG, "%s\n", stderror.str().c_str());
 
         return NUFRAW_SUCCESS;
-    } catch (Exiv2::AnyError& e) {
+    } catch (Exiv2::Error& e) {
         std::cerr.rdbuf(savecerr);
         std::string s(e.what());
         nufraw_message(NUFRAW_SET_WARNING, "%s\n", s.c_str());
@@ -156,7 +156,7 @@ static Exiv2::ExifData nufraw_prepare_exifdata(nufraw_data *uf)
         if ((pos = exifData.findKey(Exiv2::ExifKey("Exif.Image.Orientation")))
                 != exifData.end()) {
             nufraw_message(NUFRAW_SET_LOG, "Resetting %s from '%d' to '1'\n",
-                          pos->key().c_str(), pos->value().toLong());
+                          pos->key().c_str(), pos->value().toInt64());
             pos->setValue("1"); /* 1 = Normal orientation */
         }
     }
@@ -327,7 +327,7 @@ extern "C" int nufraw_exif_prepare_output(nufraw_data *uf)
         nufraw_message(NUFRAW_SET_LOG, "%s\n", stderror.str().c_str());
 
         return NUFRAW_SUCCESS;
-    } catch (Exiv2::AnyError& e) {
+    } catch (Exiv2::Error& e) {
         std::cerr.rdbuf(savecerr);
         std::string s(e.what());
         nufraw_message(NUFRAW_SET_WARNING, "%s\n", s.c_str());
@@ -347,7 +347,7 @@ extern "C" int nufraw_exif_write(nufraw_data *uf)
 
         char *filename =
             uf_win32_locale_filename_from_utf8(uf->conf->outputFilename);
-        Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename);
+        Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open(filename);
         uf_win32_locale_filename_free(filename);
         assert(image.get() != 0);
 
@@ -367,7 +367,7 @@ extern "C" int nufraw_exif_write(nufraw_data *uf)
         nufraw_message(NUFRAW_SET_LOG, "%s\n", stderror.str().c_str());
 
         return NUFRAW_SUCCESS;
-    } catch (Exiv2::AnyError& e) {
+    } catch (Exiv2::Error& e) {
         std::cerr.rdbuf(savecerr);
         std::string s(e.what());
         nufraw_message(NUFRAW_SET_WARNING, "%s\n", s.c_str());