Commit eba5ca5c authored by aseppala's avatar aseppala

[transfer-engine] Initialize angle and mirrored variables in metadata handling. Fixes MER#1278

parent 80be6f1d
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment