Commit 66d0268b authored by Martin Tobias Holmedahl Sandsmark's avatar Martin Tobias Holmedahl Sandsmark Committed by Albert Astals Cid
Browse files

image thumbnails: Make reading a bit more robust

QImageReader::read(QImage*) is more robust than QImageReader::read(),
i. e. less error checking.
This makes it more likely we get thumbnails for partially damaged files
and semi-buggy QImage plugins.
parent 0140c9a7
Pipeline #189145 passed with stage
in 5 minutes and 41 seconds
......@@ -19,7 +19,7 @@ bool ImageCreator::create(const QString &path, int, int, QImage &img)
QImageReader ir(path);
ir.setAutoTransform(true);
ir.setDecideFormatFromContent(true);
img = ir.read();
ir.read(&img);
if (img.isNull())
return false;
if (img.depth() != 32)
......
Supports Markdown
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