Lines 1-5
Link Here
|
1 |
// SPDX-FileCopyrightText: 2003-2020 The KPhotoAlbum Development Team |
1 |
// SPDX-FileCopyrightText: 2003-2020 The KPhotoAlbum Development Team |
2 |
// SPDX-FileCopyrightText: 2021 Johannes Zarl-Zierl <johannes@zarl-zierl.at> |
2 |
// SPDX-FileCopyrightText: 2021 Johannes Zarl-Zierl <johannes@zarl-zierl.at> |
|
|
3 |
// SPDX-FileCopyrightText: 2023 Tobias Leupold <tl at stonemx dot de> |
3 |
// |
4 |
// |
4 |
// SPDX-License-Identifier: GPL-2.0-or-later |
5 |
// SPDX-License-Identifier: GPL-2.0-or-later |
5 |
|
6 |
|
Lines 16-22
Link Here
|
16 |
#include <QTextCodec> |
17 |
#include <QTextCodec> |
17 |
#include <exiv2/exv_conf.h> |
18 |
#include <exiv2/exv_conf.h> |
18 |
#include <exiv2/image.hpp> |
19 |
#include <exiv2/image.hpp> |
19 |
#include <exiv2/version.hpp> |
|
|
20 |
|
20 |
|
21 |
using namespace Exif; |
21 |
using namespace Exif; |
22 |
|
22 |
|
Lines 166-172
Info::Info()
Link Here
|
166 |
void Exif::writeExifInfoToFile(const DB::FileName &srcName, const QString &destName, const QString &imageDescription) |
166 |
void Exif::writeExifInfoToFile(const DB::FileName &srcName, const QString &destName, const QString &imageDescription) |
167 |
{ |
167 |
{ |
168 |
// Load Exif from source image |
168 |
// Load Exif from source image |
169 |
Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(QFile::encodeName(srcName.absolute()).data()); |
169 |
auto image = Exiv2::ImageFactory::open(QFile::encodeName(srcName.absolute()).data()); |
170 |
image->readMetadata(); |
170 |
image->readMetadata(); |
171 |
Exiv2::ExifData data = image->exifData(); |
171 |
Exiv2::ExifData data = image->exifData(); |
172 |
|
172 |
|
Lines 201-207
Exif::Metadata Exif::Info::metadata(const DB::FileName &fileName)
Link Here
|
201 |
{ |
201 |
{ |
202 |
try { |
202 |
try { |
203 |
Exif::Metadata result; |
203 |
Exif::Metadata result; |
204 |
Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(QFile::encodeName(fileName.absolute()).data()); |
204 |
auto image = Exiv2::ImageFactory::open(QFile::encodeName(fileName.absolute()).data()); |
205 |
Q_ASSERT(image.get() != nullptr); |
205 |
Q_ASSERT(image.get() != nullptr); |
206 |
image->readMetadata(); |
206 |
image->readMetadata(); |
207 |
result.exif = image->exifData(); |
207 |
result.exif = image->exifData(); |