Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #39 from nemomobile/fixmetadata
[transfer-engine] Initialize angle and mirrored variables in metadata…
  • Loading branch information
antseppa committed Sep 1, 2015
2 parents 80be6f1 + eba5ca5 commit b0fd8b4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/imageoperation.cpp
Expand Up @@ -321,17 +321,16 @@ QString ImageOperation::scaleImageToSize(const QString &sourceFile, quint64 targ

void ImageOperation::imageOrientation(const QString &sourceFile, int *angle, bool *mirror)
{
*angle = 0;
*mirror = false;

if(!QuillMetadata::canRead(sourceFile)) {
qWarning() << Q_FUNC_INFO << "Can't read metadata";
*angle = 0;
*mirror = false;
return;
}
QuillMetadata md(sourceFile);
if (!md.hasExif()) {
qWarning() << "Metadata invalid";
*angle = 0;
*mirror = false;
return;
}

Expand Down

0 comments on commit b0fd8b4

Please sign in to comment.