Commit 880a09ad authored by Miklós Máté's avatar Miklós Máté Committed by Nate Graham

manually set format in jpeg thumbnail creator

Otherwise the QImageReader sets the format based on the file name suffix, which might be misleading, e.g. a jpeg file named image.png.

CCBUG: 220496

Reviewers: dfaure, elvisangelaccio, #frameworks

Reviewed By: dfaure, elvisangelaccio

Subscribers: kde-frameworks-devel, kfm-devel, ngraham

Tags: #dolphin, #frameworks

Differential Revision:
parent c5a15cee
......@@ -40,7 +40,7 @@ JpegCreator::JpegCreator()
bool JpegCreator::create(const QString &path, int width, int height, QImage &image)
QImageReader imageReader(path);
QImageReader imageReader(path, "jpeg");
const QSize imageSize = imageReader.size();
if (imageSize.isValid() && (imageSize.width() > width || imageSize.height() > height)) {
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