Fixing a bug with Frame::AddImage (convertToFormat) not actually doing anything. It returns a new image, and does not convert the format in-place.

This commit is contained in:
Jonathan Thomas
2018-03-04 23:59:14 -06:00
parent 1ec9e4426a
commit 6e99445eca

View File

@@ -739,7 +739,7 @@ void Frame::AddImage(int new_width, int new_height, int bytes_per_pixel, QImage:
// Always convert to RGBA8888 (if different)
if (image->format() != QImage::Format_RGBA8888)
image->convertToFormat(QImage::Format_RGBA8888);
*image = image->convertToFormat(QImage::Format_RGBA8888);
// Update height and width
width = image->width();
@@ -763,7 +763,7 @@ void Frame::AddImage(std::shared_ptr<QImage> new_image)
// Always convert to RGBA8888 (if different)
if (image->format() != QImage::Format_RGBA8888)
image->convertToFormat(QImage::Format_RGBA8888);
*image = image->convertToFormat(QImage::Format_RGBA8888);
// Update height and width
width = image->width();