Lines 9-11
Link Here
|
9 |
#include <assert.h> |
9 |
#include <assert.h> |
10 |
#include "exiv2-metadata.h" |
10 |
#include "exiv2-metadata.h" |
11 |
#include <math.h> |
11 |
#include <math.h> |
12 |
- |
12 |
@@ -94,7 +96,7 @@ gboolean |
|
|
13 |
exiv2_load_meta_interface(const gchar *service, RAWFILE *rawfile, guint offset, RSMetadata *meta) |
14 |
{ |
15 |
try { |
16 |
- Image::AutoPtr img = ImageFactory::open((byte*)raw_get_map(rawfile), raw_get_filesize(rawfile)); |
17 |
+ Image::UniquePtr img { ImageFactory::open((byte*)raw_get_map(rawfile), raw_get_filesize(rawfile)) }; |
18 |
img->readMetadata(); |
19 |
ExifData &exifData = img->exifData(); |
20 |
|
21 |
@@ -121,7 +123,7 @@ exiv2_load_meta_interface(const gchar *service, RAWFIL |
22 |
i = orientation(exifData); |
23 |
if (i != exifData.end()) |
24 |
{ |
25 |
- switch (i->getValue()->toLong()) |
26 |
+ switch (i->getValue()->toInt64()) |
27 |
{ |
28 |
case 6: meta->orientation = 90; |
29 |
break; |
30 |
@@ -173,7 +175,7 @@ exiv2_load_meta_interface(const gchar *service, RAWFIL |
31 |
#if EXIV2_TEST_VERSION(0,19,0) |
32 |
i = isoSpeed(exifData); |
33 |
if (i != exifData.end()) |
34 |
- meta->iso = i->toLong(); |
35 |
+ meta->iso = i->toInt64(); |
36 |
|
37 |
/* Text based Lens Identifier */ |
38 |
i = lensName(exifData); |
39 |
@@ -181,7 +183,7 @@ exiv2_load_meta_interface(const gchar *service, RAWFIL |
40 |
{ |
41 |
TypeId type = i->typeId(); |
42 |
if (type == unsignedShort || type == unsignedLong || type == signedShort || type == signedLong || type == unsignedByte || type == signedByte) |
43 |
- meta->lens_id = i->toLong(); |
44 |
+ meta->lens_id = i->toInt64(); |
45 |
else if (type == asciiString || type == string) |
46 |
meta->fixed_lens_identifier = g_strdup(i->toString().c_str()); |
47 |
} |
48 |
@@ -223,7 +225,7 @@ exiv2_load_meta_interface(const gchar *service, RAWFIL |
49 |
if (i == exifData.end()) |
50 |
i = exifData.findKey(ExifKey("Exif.NikonLd3.MinFocalLength")); |
51 |
if (i != exifData.end()) |
52 |
- meta->lens_min_focal = 5.0 * pow(2.0, i->toLong()/24.0); |
53 |
+ meta->lens_min_focal = 5.0 * pow(2.0, i->toInt64()/24.0); |
54 |
|
55 |
i = exifData.findKey(ExifKey("Exif.NikonLd1.MaxFocalLength")); |
56 |
if (i == exifData.end()) |
57 |
@@ -231,7 +233,7 @@ exiv2_load_meta_interface(const gchar *service, RAWFIL |
58 |
if (i == exifData.end()) |
59 |
i = exifData.findKey(ExifKey("Exif.NikonLd3.MaxFocalLength")); |
60 |
if (i != exifData.end()) |
61 |
- meta->lens_max_focal = 5.0 * pow(2.0, i->toLong()/24.0); |
62 |
+ meta->lens_max_focal = 5.0 * pow(2.0, i->toInt64()/24.0); |
63 |
|
64 |
i = exifData.findKey(ExifKey("Exif.NikonLd1.MaxApertureAtMinFocal")); |
65 |
if (i == exifData.end()) |
66 |
@@ -239,7 +241,7 @@ exiv2_load_meta_interface(const gchar *service, RAWFIL |
67 |
if (i == exifData.end()) |
68 |
i = exifData.findKey(ExifKey("Exif.NikonLd3.MaxApertureAtMinFocal")); |
69 |
if (i != exifData.end()) |
70 |
- meta->lens_min_aperture = i->toLong()/12.0; |
71 |
+ meta->lens_min_aperture = i->toInt64()/12.0; |
72 |
|
73 |
i = exifData.findKey(ExifKey("Exif.NikonLd1.MaxApertureAtMaxFocal")); |
74 |
if (i == exifData.end()) |
75 |
@@ -247,7 +249,7 @@ exiv2_load_meta_interface(const gchar *service, RAWFIL |
76 |
if (i == exifData.end()) |
77 |
i = exifData.findKey(ExifKey("Exif.NikonLd3.MaxApertureAtMaxFocal")); |
78 |
if (i != exifData.end()) |
79 |
- meta->lens_max_aperture = i->toLong()/12.0; |
80 |
+ meta->lens_max_aperture = i->toInt64()/12.0; |
81 |
|
82 |
/* Fuji */ |
83 |
i = exifData.findKey(ExifKey("Exif.Fujifilm.MinFocalLength")); |