Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graphics
libkexiv2
Commits
6a22771f
Commit
6a22771f
authored
Aug 29, 2014
by
Laurent Montel
😁
Browse files
kdebug--
parent
aa0e7d2e
Changes
18
Hide whitespace changes
Inline
Side-by-side
src/altlangstredit.cpp
View file @
6a22771f
...
...
@@ -42,7 +42,7 @@
#include <klocale.h>
#include <ktextedit.h>
#include <kcombobox.h>
#include <
kd
ebug
.h
>
#include <
QD
ebug>
using
namespace
KExiv2Iface
;
class
AltLangStrEdit
::
Private
...
...
src/countryselector.cpp
View file @
6a22771f
...
...
@@ -33,7 +33,7 @@
// KDE includes
#include <klocale.h>
#include <
kd
ebug
.h
>
#include <
QD
ebug>
namespace
KExiv2Iface
{
...
...
@@ -347,7 +347,7 @@ void CountrySelector::setCountry(const QString& countryCode)
}
setCurrentIndex
(
id
);
k
Debug
()
<<
count
()
<<
" :: "
<<
id
;
q
Debug
()
<<
count
()
<<
" :: "
<<
id
;
}
bool
CountrySelector
::
country
(
QString
&
countryCode
,
QString
&
countryName
)
...
...
src/kexiv2.cpp
View file @
6a22771f
...
...
@@ -279,7 +279,7 @@ bool KExiv2::loadFromData(const QByteArray& imgData) const
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
@@ -335,7 +335,7 @@ bool KExiv2::load(const QString& filePath) const
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
#ifdef _XMP_SUPPORT_
...
...
@@ -365,7 +365,7 @@ bool KExiv2::load(const QString& filePath) const
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
#endif // _XMP_SUPPORT_
...
...
@@ -393,7 +393,7 @@ bool KExiv2::save(const QString& imageFilePath) const
QFileInfo
givenFileInfo
(
imageFilePath
);
if
(
givenFileInfo
.
isSymLink
())
{
k
Debug
()
<<
"filePath"
<<
imageFilePath
<<
"is a symlink."
q
Debug
()
<<
"filePath"
<<
imageFilePath
<<
"is a symlink."
<<
"Using target"
<<
givenFileInfo
.
canonicalPath
();
regularFilePath
=
givenFileInfo
.
canonicalPath
();
// Walk all the symlinks
...
...
@@ -404,7 +404,7 @@ bool KExiv2::save(const QString& imageFilePath) const
QFileInfo
dinfo
(
finfo
.
path
());
if
(
!
dinfo
.
isWritable
())
{
k
Debug
()
<<
"Dir '"
<<
dinfo
.
filePath
()
<<
"' is read-only. Metadata not saved."
;
q
Debug
()
<<
"Dir '"
<<
dinfo
.
filePath
()
<<
"' is read-only. Metadata not saved."
;
return
false
;
}
...
...
@@ -414,7 +414,7 @@ bool KExiv2::save(const QString& imageFilePath) const
bool
writtenToFile
=
false
;
bool
writtenToSidecar
=
false
;
k
Debug
()
<<
"KExiv2::metadataWritingMode"
<<
d
->
metadataWritingMode
;
q
Debug
()
<<
"KExiv2::metadataWritingMode"
<<
d
->
metadataWritingMode
;
switch
(
d
->
metadataWritingMode
)
{
...
...
@@ -436,21 +436,21 @@ bool KExiv2::save(const QString& imageFilePath) const
if
(
writeToFile
)
{
k
Debug
()
<<
"Will write Metadata to file"
<<
finfo
.
fileName
();
q
Debug
()
<<
"Will write Metadata to file"
<<
finfo
.
fileName
();
writtenToFile
=
d
->
saveToFile
(
finfo
);
if
(
writeToFile
)
{
k
Debug
()
<<
"Metadata for file"
<<
finfo
.
fileName
()
<<
"written to file."
;
q
Debug
()
<<
"Metadata for file"
<<
finfo
.
fileName
()
<<
"written to file."
;
}
}
if
(
writeToSidecar
||
(
writeToSidecarIfFileNotPossible
&&
!
writtenToFile
))
{
k
Debug
()
<<
"Will write XMP sidecar for file"
<<
givenFileInfo
.
fileName
();
q
Debug
()
<<
"Will write XMP sidecar for file"
<<
givenFileInfo
.
fileName
();
writtenToSidecar
=
d
->
saveToXMPSidecar
(
imageFilePath
);
if
(
writtenToSidecar
)
{
k
Debug
()
<<
"Metadata for file '"
<<
givenFileInfo
.
fileName
()
<<
"' written to XMP sidecar."
;
q
Debug
()
<<
"Metadata for file '"
<<
givenFileInfo
.
fileName
()
<<
"' written to XMP sidecar."
;
}
}
...
...
@@ -461,7 +461,7 @@ bool KExiv2::applyChanges() const
{
if
(
d
->
filePath
.
isEmpty
())
{
k
Debug
()
<<
"Failed to apply changes: file path is empty!"
;
q
Debug
()
<<
"Failed to apply changes: file path is empty!"
;
return
false
;
}
...
...
src/kexiv2_p.cpp
View file @
6a22771f
...
...
@@ -85,7 +85,7 @@ bool KExiv2::Private::saveToXMPSidecar(const QFileInfo& finfo) const
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
return
false
;
}
}
...
...
@@ -94,7 +94,7 @@ bool KExiv2::Private::saveToFile(const QFileInfo& finfo) const
{
if
(
!
finfo
.
isWritable
())
{
k
Debug
()
<<
"File '"
<<
finfo
.
fileName
().
toAscii
().
constData
()
<<
"' is read only. Metadata not written."
;
q
Debug
()
<<
"File '"
<<
finfo
.
fileName
().
toAscii
().
constData
()
<<
"' is read only. Metadata not written."
;
return
false
;
}
...
...
@@ -122,7 +122,7 @@ bool KExiv2::Private::saveToFile(const QFileInfo& finfo) const
if
(
!
writeRawFiles
&&
(
rawTiffBasedSupported
.
contains
(
ext
)
||
rawTiffBasedNotSupported
.
contains
(
ext
))
)
{
k
Debug
()
<<
finfo
.
fileName
()
q
Debug
()
<<
finfo
.
fileName
()
<<
"is a TIFF based RAW file, writing to such a file is disabled by current settings."
;
return
false
;
}
...
...
@@ -130,20 +130,20 @@ bool KExiv2::Private::saveToFile(const QFileInfo& finfo) const
/*
if (rawTiffBasedNotSupported.contains(ext))
{
k
Debug() << finfo.fileName()
q
Debug() << finfo.fileName()
<< "is TIFF based RAW file not yet supported. Metadata not saved.";
return false;
}
if (rawTiffBasedSupported.contains(ext) && !writeRawFiles)
{
k
Debug() << finfo.fileName()
q
Debug() << finfo.fileName()
<< "is TIFF based RAW file supported but writing mode is disabled. "
<< "Metadata not saved.";
return false;
}
k
Debug() << "File Extension: " << ext << " is supported for writing mode";
q
Debug() << "File Extension: " << ext << " is supported for writing mode";
bool ret = false;
*/
...
...
@@ -161,7 +161,7 @@ bool KExiv2::Private::saveToFile(const QFileInfo& finfo) const
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
return
false
;
}
}
...
...
@@ -269,12 +269,12 @@ bool KExiv2::Private::saveOperations(const QFileInfo& finfo, Exiv2::Image::AutoP
if
(
!
wroteComment
&&
!
wroteEXIF
&&
!
wroteIPTC
&&
!
wroteXMP
)
{
k
Debug
()
<<
"Writing metadata is not supported for file"
<<
finfo
.
fileName
();
q
Debug
()
<<
"Writing metadata is not supported for file"
<<
finfo
.
fileName
();
return
false
;
}
else
if
(
!
wroteEXIF
||
!
wroteIPTC
||
!
wroteXMP
)
{
k
Debug
()
<<
"Support for writing metadata is limited for file"
<<
finfo
.
fileName
()
q
Debug
()
<<
"Support for writing metadata is limited for file"
<<
finfo
.
fileName
()
<<
"EXIF"
<<
wroteEXIF
<<
"IPTC"
<<
wroteIPTC
<<
"XMP"
<<
wroteXMP
;
}
...
...
@@ -311,7 +311,7 @@ bool KExiv2::Private::saveOperations(const QFileInfo& finfo, Exiv2::Image::AutoP
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
@@ -330,13 +330,13 @@ void KExiv2Data::Private::clear()
void
KExiv2
::
Private
::
printExiv2ExceptionError
(
const
QString
&
msg
,
Exiv2
::
Error
&
e
)
{
std
::
string
s
(
e
.
what
());
kError
()
<<
msg
.
toAscii
().
constData
()
<<
" (Error #"
qCritical
()
<<
msg
.
toAscii
().
constData
()
<<
" (Error #"
<<
e
.
code
()
<<
": "
<<
s
.
c_str
();
}
void
KExiv2
::
Private
::
printExiv2MessageHandler
(
int
lvl
,
const
char
*
msg
)
{
k
Debug
()
<<
"Exiv2 ("
<<
lvl
<<
") : "
<<
msg
;
q
Debug
()
<<
"Exiv2 ("
<<
lvl
<<
") : "
<<
msg
;
}
QString
KExiv2
::
Private
::
convertCommentValue
(
const
Exiv2
::
Exifdatum
&
exifDatum
)
const
...
...
@@ -388,7 +388,7 @@ QString KExiv2::Private::convertCommentValue(const Exiv2::Exifdatum& exifDatum)
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
QString
();
...
...
src/kexiv2comments.cpp
View file @
6a22771f
...
...
@@ -46,12 +46,12 @@ bool KExiv2::canWriteComment(const QString& filePath)
catch
(
Exiv2
::
Error
&
e
)
{
std
::
string
s
(
e
.
what
());
kError
()
<<
"Cannot check Comment access mode using Exiv2 (Error #"
qCritical
()
<<
"Cannot check Comment access mode using Exiv2 (Error #"
<<
e
.
code
()
<<
": "
<<
s
.
c_str
()
<<
")"
;
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
src/kexiv2exif.cpp
View file @
6a22771f
...
...
@@ -54,12 +54,12 @@ bool KExiv2::canWriteExif(const QString& filePath)
catch
(
Exiv2
::
Error
&
e
)
{
std
::
string
s
(
e
.
what
());
kError
()
<<
"Cannot check Exif access mode using Exiv2 (Error #"
qCritical
()
<<
"Cannot check Exif access mode using Exiv2 (Error #"
<<
e
.
code
()
<<
": "
<<
s
.
c_str
()
<<
")"
;
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
@@ -83,7 +83,7 @@ bool KExiv2::clearExif() const
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
@@ -117,13 +117,13 @@ QByteArray KExiv2::getExifEncoded(bool addExifHeader) const
catch
(
Exiv2
::
Error
&
e
)
{
if
(
!
d
->
filePath
.
isEmpty
())
k
Debug
()
<<
"From file "
<<
d
->
filePath
.
toAscii
().
constData
();
q
Debug
()
<<
"From file "
<<
d
->
filePath
.
toAscii
().
constData
();
d
->
printExiv2ExceptionError
(
"Cannot get Exif data using Exiv2 "
,
e
);
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
QByteArray
();
...
...
@@ -142,13 +142,13 @@ bool KExiv2::setExif(const QByteArray& data) const
catch
(
Exiv2
::
Error
&
e
)
{
if
(
!
d
->
filePath
.
isEmpty
())
kError
()
<<
"From file "
<<
d
->
filePath
.
toAscii
().
constData
();
qCritical
()
<<
"From file "
<<
d
->
filePath
.
toAscii
().
constData
();
d
->
printExiv2ExceptionError
(
"Cannot set Exif data using Exiv2 "
,
e
);
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
@@ -222,7 +222,7 @@ KExiv2::MetaDataMap KExiv2::getExifTagsDataList(const QStringList& exifKeysFilte
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
MetaDataMap
();
...
...
@@ -274,7 +274,7 @@ QString KExiv2::getExifComment() const
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
QString
();
...
...
@@ -338,7 +338,7 @@ bool KExiv2::setExifComment(const QString& comment, bool setProgramName) const
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
@@ -359,7 +359,7 @@ QString KExiv2::getExifTagTitle(const char* exifTagName)
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
QString
();
...
...
@@ -380,7 +380,7 @@ QString KExiv2::getExifTagDescription(const char* exifTagName)
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
QString
();
...
...
@@ -408,7 +408,7 @@ bool KExiv2::removeExifTag(const char* exifTagName, bool setProgramName) const
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
@@ -437,7 +437,7 @@ bool KExiv2::getExifTagRational(const char* exifTagName, long int& num, long int
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
@@ -459,7 +459,7 @@ bool KExiv2::setExifTagLong(const char* exifTagName, long val, bool setProgramNa
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
@@ -481,7 +481,7 @@ bool KExiv2::setExifTagRational(const char* exifTagName, long int num, long int
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
@@ -507,7 +507,7 @@ bool KExiv2::setExifTagData(const char* exifTagName, const QByteArray& data, boo
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
@@ -572,7 +572,7 @@ bool KExiv2::setExifTagVariant(const char* exifTagName, const QVariant& val,
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
@@ -669,7 +669,7 @@ QString KExiv2::createExifUserStringFromValue(const char* exifTagName, const QVa
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
QString
();
...
...
@@ -701,7 +701,7 @@ bool KExiv2::getExifTagLong(const char* exifTagName, long& val, int component) c
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
@@ -732,7 +732,7 @@ QByteArray KExiv2::getExifTagData(const char* exifTagName) const
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
QByteArray
();
...
...
@@ -818,7 +818,7 @@ QVariant KExiv2::getExifTagVariant(const char* exifTagName, bool rationalAsListO
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
QVariant
();
...
...
@@ -851,7 +851,7 @@ QString KExiv2::getExifTagString(const char* exifTagName, bool escapeCR) const
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
QString
();
...
...
@@ -873,7 +873,7 @@ bool KExiv2::setExifTagString(const char* exifTagName, const QString& value, boo
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
@@ -907,7 +907,7 @@ QImage KExiv2::getExifThumbnail(bool fixOrientation) const
if
(
it
!=
exifData
.
end
()
&&
it
->
count
())
{
long
orientation
=
it
->
toLong
();
k
Debug
()
<<
"Exif Thumbnail Orientation: "
<<
(
int
)
orientation
;
q
Debug
()
<<
"Exif Thumbnail Orientation: "
<<
(
int
)
orientation
;
rotateExifQImage
(
thumbnail
,
(
ImageOrientation
)
orientation
);
}
...
...
@@ -921,7 +921,7 @@ QImage KExiv2::getExifThumbnail(bool fixOrientation) const
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
thumbnail
;
...
...
@@ -966,7 +966,7 @@ bool KExiv2::setExifThumbnail(const QImage& thumbImage, bool setProgramName) con
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
@@ -1025,7 +1025,7 @@ bool KExiv2::setTiffThumbnail(const QImage& thumbImage, bool setProgramName) con
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
@@ -1046,7 +1046,7 @@ bool KExiv2::removeExifThumbnail() const
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
@@ -1098,7 +1098,7 @@ KExiv2::TagsMap KExiv2::getStdExifTagsList() const
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
TagsMap
();
...
...
@@ -1151,7 +1151,7 @@ KExiv2::TagsMap KExiv2::getMakernoteTagsList() const
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
TagsMap
();
...
...
src/kexiv2gps.cpp
View file @
6a22771f
...
...
@@ -132,7 +132,7 @@ bool KExiv2::getGPSLatitudeNumber(double* const latitude) const
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
@@ -228,7 +228,7 @@ bool KExiv2::getGPSLongitudeNumber(double* const longitude) const
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
@@ -302,7 +302,7 @@ bool KExiv2::getGPSAltitude(double* const altitude) const
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
@@ -360,7 +360,7 @@ bool KExiv2::initializeGPSInfo(const bool setProgramName)
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
@@ -492,7 +492,7 @@ bool KExiv2::setGPSInfo(const double* const altitude, const double latitude, con
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
@@ -581,7 +581,7 @@ bool KExiv2::removeGPSInfo(const bool setProgramName)
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
src/kexiv2image.cpp
View file @
6a22771f
...
...
@@ -88,7 +88,7 @@ bool KExiv2::setImageProgramId(const QString& program, const QString& version) c
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
@@ -181,7 +181,7 @@ QSize KExiv2::getImageDimensions() const
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
QSize
();
...
...
@@ -221,7 +221,7 @@ bool KExiv2::setImageDimensions(const QSize& size, bool setProgramName) const
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
false
;
...
...
@@ -247,7 +247,7 @@ KExiv2::ImageOrientation KExiv2::getImageOrientation() const
orientation
=
str
.
toLong
(
&
ok
);
if
(
ok
)
{
k
Debug
()
<<
"Orientation => Xmp.tiff.Orientation => "
<<
(
int
)
orientation
;
q
Debug
()
<<
"Orientation => Xmp.tiff.Orientation => "
<<
(
int
)
orientation
;
return
(
ImageOrientation
)
orientation
;
}
}
...
...
@@ -265,7 +265,7 @@ KExiv2::ImageOrientation KExiv2::getImageOrientation() const
if
(
it
!=
exifData
.
end
()
&&
it
->
count
())
{
orientation
=
it
->
toLong
();
k
Debug
()
<<
"Orientation => Exif.MinoltaCs7D.Rotation => "
<<
(
int
)
orientation
;
q
Debug
()
<<
"Orientation => Exif.MinoltaCs7D.Rotation => "
<<
(
int
)
orientation
;
switch
(
orientation
)
{
case
76
:
...
...
@@ -284,7 +284,7 @@ KExiv2::ImageOrientation KExiv2::getImageOrientation() const
if
(
it
!=
exifData
.
end
()
&&
it
->
count
())
{
orientation
=
it
->
toLong
();
k
Debug
()
<<
"Orientation => Exif.MinoltaCs5D.Rotation => "
<<
(
int
)
orientation
;
q
Debug
()
<<
"Orientation => Exif.MinoltaCs5D.Rotation => "
<<
(
int
)
orientation
;
switch
(
orientation
)
{
case
76
:
...
...
@@ -305,7 +305,7 @@ KExiv2::ImageOrientation KExiv2::getImageOrientation() const
if
(
it
!=
exifData
.
end
()
&&
it
->
count
())
{
orientation
=
it
->
toLong
();
k
Debug
()
<<
"Orientation => Exif.Image.Orientation => "
<<
(
int
)
orientation
;
q
Debug
()
<<
"Orientation => Exif.Image.Orientation => "
<<
(
int
)
orientation
;
return
(
ImageOrientation
)
orientation
;
}
...
...
@@ -316,7 +316,7 @@ KExiv2::ImageOrientation KExiv2::getImageOrientation() const
}
catch
(...)
{
kError
()
<<
"Default exception from Exiv2"
;
qCritical
()
<<
"Default exception from Exiv2"
;
}
return
ORIENTATION_UNSPECIFIED
;
...
...
@@ -331,14 +331,14 @@ bool KExiv2::setImageOrientation(ImageOrientation orientation, bool setProgramNa
{
if
(
orientation
<
ORIENTATION_UNSPECIFIED
||
orientation
>
ORIENTATION_ROT_270
)
{
k
Debug
()
<<
"Image orientation value is not correct!"
;
q
Debug
()
<<
"Image orientation value is not correct!"
;
return
false
;
}
// Set Exif values.
d
->
exifMetadata
()[
"Exif.Image.Orientation"
]
=
static_cast
<
uint16_t
>
(
orientation
);
k
Debug
()
<<
"Exif.Image.Orientation tag set to: "
<<
(
int
)
orientation
;
q
Debug
()
<<
"Exif.Image.Orientation tag set to: "
<<
(
int
)
orientation
;
// Set Xmp values.
...
...
@@ -360,7 +360,7 @@ bool KExiv2::setImageOrientation(ImageOrientation orientation, bool setProgramNa
if
(
it
!=
d
->
exifMetadata
().
end
())
{
d
->
exifMetadata
().
erase
(
it
);
k
Debug
()
<<
"Removing Exif.MinoltaCs7D.Rotation tag"
;
q
Debug
()
<<
"Removing Exif.MinoltaCs7D.Rotation tag"
;
}
Exiv2
::
ExifKey
minoltaKey2
(
"Exif.MinoltaCs5D.Rotation"
);
...
...
@@ -368,7 +368,7 @@ bool KExiv2::setImageOrientation(ImageOrientation orientation, bool setProgramNa
if
(
it
!=
d
->
exifMetadata
().
end
())
{
d
->
exifMetadata
().
erase
(
it
);
k
Debug
()
<<
"Removing Exif.MinoltaCs5D.Rotation tag"
;