Lines 1-13
Link Here
|
1 |
--- exif-gps.cpp.orig 2019-07-07 08:26:16 UTC |
1 |
--- exif-gps.cpp.orig 2012-08-14 10:11:01 UTC |
2 |
+++ exif-gps.cpp |
2 |
+++ exif-gps.cpp |
3 |
@@ -40,9 +40,7 @@ |
3 |
@@ -40,10 +40,8 @@ |
4 |
#include <sys/stat.h> |
4 |
#include <sys/stat.h> |
5 |
#include <unistd.h> |
5 |
#include <unistd.h> |
6 |
|
6 |
|
7 |
- |
|
|
8 |
-#include "exiv2/image.hpp" |
9 |
-#include "exiv2/exif.hpp" |
10 |
+#include <exiv2/exiv2.hpp> |
7 |
+#include <exiv2/exiv2.hpp> |
11 |
|
8 |
|
|
|
9 |
-#include "exiv2/image.hpp" |
10 |
-#include "exiv2/exif.hpp" |
11 |
- |
12 |
#include "gpsstructure.h" |
12 |
#include "gpsstructure.h" |
13 |
#include "exif-gps.h" |
13 |
#include "exif-gps.h" |
14 |
- |
14 |
|
|
|
15 |
@@ -87,7 +85,7 @@ char* ReadExifDate(char* File, int* IncludesGPS) |
16 |
{ |
17 |
// Open and read the file. |
18 |
Exiv2::ExifData ExifRead; |
19 |
- Exiv2::Image::AutoPtr Image; |
20 |
+ Exiv2::Image::UniquePtr Image; |
21 |
|
22 |
try { |
23 |
Image = Exiv2::ImageFactory::open(File); |
24 |
@@ -150,7 +148,7 @@ char* ReadExifData(char* File, double* Lat, double* Lo |
25 |
// for display purposes. For the GUI version. |
26 |
// Open and read the file. |
27 |
Exiv2::ExifData ExifRead; |
28 |
- Exiv2::Image::AutoPtr Image; |
29 |
+ Exiv2::Image::UniquePtr Image; |
30 |
|
31 |
try { |
32 |
Image = Exiv2::ImageFactory::open(File); |
33 |
@@ -268,7 +266,7 @@ char* ReadExifData(char* File, double* Lat, double* Lo |
34 |
|
35 |
// Is the altitude below sea level? If so, negate the value. |
36 |
GPSData = ExifRead["Exif.GPSInfo.GPSAltitudeRef"]; |
37 |
- if (GPSData.count() >= 1 && GPSData.toLong() == 1) |
38 |
+ if (GPSData.count() >= 1 && GPSData.toInt64() == 1) |
39 |
{ |
40 |
// Negate the elevation. |
41 |
*Elev = -*Elev; |
42 |
@@ -289,7 +287,7 @@ char* ReadGPSTimestamp(char* File, char* DateStamp, ch |
43 |
// for display purposes. For the GUI version. |
44 |
// Open and read the file. |
45 |
Exiv2::ExifData ExifRead; |
46 |
- Exiv2::Image::AutoPtr Image; |
47 |
+ Exiv2::Image::UniquePtr Image; |
48 |
|
49 |
try { |
50 |
Image = Exiv2::ImageFactory::open(File); |
51 |
@@ -445,7 +443,7 @@ int WriteGPSData(char* File, struct GPSPoint* Point, c |
52 |
struct utimbuf utb; |
53 |
if (NoChangeMtime) |
54 |
stat(File, &statbuf); |
55 |
- Exiv2::Image::AutoPtr Image; |
56 |
+ Exiv2::Image::UniquePtr Image; |
57 |
|
58 |
try { |
59 |
Image = Exiv2::ImageFactory::open(File); |
60 |
@@ -473,7 +471,7 @@ int WriteGPSData(char* File, struct GPSPoint* Point, c |
61 |
// Do all the easy constant ones first. |
62 |
// GPSVersionID tag: standard says is should be four bytes: 02 00 00 00 |
63 |
// (and, must be present). |
64 |
- Exiv2::Value::AutoPtr Value = Exiv2::Value::create(Exiv2::unsignedByte); |
65 |
+ Exiv2::Value::UniquePtr Value = Exiv2::Value::create(Exiv2::unsignedByte); |
66 |
Value->read("2 0 0 0"); |
67 |
ExifToWrite.add(Exiv2::ExifKey("Exif.GPSInfo.GPSVersionID"), Value.get()); |
68 |
// Datum: the datum of the measured data. If not given, we insert WGS-84. |
69 |
@@ -660,7 +658,7 @@ int WriteFixedDatestamp(char* File, time_t Time) |
70 |
struct utimbuf utb; |
71 |
stat(File, &statbuf); |
72 |
|
73 |
- Exiv2::Image::AutoPtr Image; |
74 |
+ Exiv2::Image::UniquePtr Image; |
75 |
|
76 |
try { |
77 |
Image = Exiv2::ImageFactory::open(File); |
78 |
@@ -699,7 +697,7 @@ int WriteFixedDatestamp(char* File, time_t Time) |
79 |
|
80 |
char ScratchBuf[100]; |
81 |
|
82 |
- Exiv2::Value::AutoPtr Value; |
83 |
+ Exiv2::Value::UniquePtr Value; |
84 |
Value = Exiv2::Value::create(Exiv2::signedRational); |
85 |
snprintf(ScratchBuf, 100, "%d/1 %d/1 %d/1", |
86 |
TimeStamp.tm_year + 1900, |
87 |
@@ -737,7 +735,7 @@ int RemoveGPSExif(char* File, int NoChangeMtime) |
88 |
stat(File, &statbuf); |
89 |
|
90 |
// Open the file and start reading. |
91 |
- Exiv2::Image::AutoPtr Image; |
92 |
+ Exiv2::Image::UniquePtr Image; |
93 |
|
94 |
try { |
95 |
Image = Exiv2::ImageFactory::open(File); |