Lines 1-4
Link Here
|
1 |
--- Sources/ptImageHelper.cpp.orig 2019-07-07 08:34:52 UTC |
1 |
--- Sources/ptImageHelper.cpp.orig 2023-07-02 14:41:47 UTC |
2 |
+++ Sources/ptImageHelper.cpp |
2 |
+++ Sources/ptImageHelper.cpp |
3 |
@@ -34,6 +34,7 @@ |
3 |
@@ -34,6 +34,7 @@ |
4 |
#pragma GCC diagnostic pop |
4 |
#pragma GCC diagnostic pop |
Lines 8-10
Link Here
|
8 |
#include <vector> |
8 |
#include <vector> |
9 |
#include <QStringList> |
9 |
#include <QStringList> |
10 |
|
10 |
|
|
|
11 |
@@ -106,7 +107,7 @@ bool ptImageHelper::WriteExif(const QString |
12 |
if (!AFileName.endsWith(JpegExtensions.at(i))) deleteDNGdata = true; |
13 |
} |
14 |
|
15 |
- Exiv2::Image::AutoPtr Exiv2Image = Exiv2::ImageFactory::open(AFileName.toLocal8Bit().data()); |
16 |
+ Exiv2::Image::UniquePtr Exiv2Image = Exiv2::ImageFactory::open(AFileName.toLocal8Bit().data()); |
17 |
|
18 |
Exiv2Image->readMetadata(); |
19 |
Exiv2::ExifData outExifData = Exiv2Image->exifData(); |
20 |
@@ -176,7 +177,7 @@ bool ptImageHelper::WriteExif(const QString |
21 |
Exiv2Image->writeMetadata(); |
22 |
return true; |
23 |
#endif |
24 |
- } catch (Exiv2::AnyError& Error) { |
25 |
+ } catch (Exiv2::Error& Error) { |
26 |
if (Settings->GetInt("JobMode") == 0) { |
27 |
ptMessageBox::warning(0 ,"Exiv2 Error","No exif data written!\nCaught Exiv2 exception '" + QString(Error.what()) + "'\n"); |
28 |
} else { |
29 |
@@ -198,7 +199,7 @@ bool ptImageHelper::ReadExif(const QString &AFi |
30 |
if (Exiv2::ImageFactory::getType(AFileName.toLocal8Bit().data()) == Exiv2::ImageType::none) |
31 |
return false; |
32 |
|
33 |
- Exiv2::Image::AutoPtr hImage = Exiv2::ImageFactory::open(AFileName.toLocal8Bit().data()); |
34 |
+ Exiv2::Image::UniquePtr hImage = Exiv2::ImageFactory::open(AFileName.toLocal8Bit().data()); |
35 |
|
36 |
if (!hImage.get()) return false; |
37 |
|
38 |
@@ -295,19 +296,19 @@ bool ptImageHelper::TransferExif(const QString ASource |
39 |
if (Exiv2::ImageFactory::getType(ASourceFile.toLocal8Bit().data()) == Exiv2::ImageType::none) |
40 |
return false; |
41 |
|
42 |
- Exiv2::Image::AutoPtr hSourceImage = Exiv2::ImageFactory::open(ASourceFile.toLocal8Bit().data()); |
43 |
+ Exiv2::Image::UniquePtr hSourceImage = Exiv2::ImageFactory::open(ASourceFile.toLocal8Bit().data()); |
44 |
|
45 |
if (!hSourceImage.get()) return false; |
46 |
|
47 |
hSourceImage->readMetadata(); |
48 |
|
49 |
- Exiv2::Image::AutoPtr hTargetImage = Exiv2::ImageFactory::open(ATargetFile.toLocal8Bit().data()); |
50 |
+ Exiv2::Image::UniquePtr hTargetImage = Exiv2::ImageFactory::open(ATargetFile.toLocal8Bit().data()); |
51 |
|
52 |
hTargetImage->clearMetadata(); |
53 |
hTargetImage->setMetadata(*hSourceImage); |
54 |
hTargetImage->writeMetadata(); |
55 |
return true; |
56 |
- } catch (Exiv2::AnyError& Error) { |
57 |
+ } catch (Exiv2::Error& Error) { |
58 |
if (Settings->GetInt("JobMode") == 0) { |
59 |
ptMessageBox::warning(0 ,"Exiv2 Error","No exif data written!\nCaught Exiv2 exception '" + QString(Error.what()) + "'\n"); |
60 |
} else { |