Converting RGB8888 to ARGB32_Premultiplied (for performance reasons)

This commit is contained in:
Jonathan Thomas
2020-10-13 18:18:10 -05:00
committed by FeRD (Frank Dana)
parent ab4916247b
commit 096c2c409d
9 changed files with 20 additions and 29 deletions

View File

@@ -98,10 +98,6 @@ void QtImageReader::Open()
throw InvalidFile("File could not be opened.", path.toStdString());
}
// Convert to proper format
image = std::make_shared<QImage>(
image->convertToFormat(QImage::Format_RGBA8888));
// Update image properties
info.has_audio = false;
info.has_video = true;
@@ -255,9 +251,6 @@ std::shared_ptr<Frame> QtImageReader::GetFrame(int64_t requested_frame)
max_width, max_height, Qt::KeepAspectRatio, Qt::SmoothTransformation));
}
cached_image = std::make_shared<QImage>(
cached_image->convertToFormat(QImage::Format_RGBA8888));
// Set max size (to later determine if max_size is changed)
max_size.setWidth(max_width);
max_size.setHeight(max_height);