From 6e99445eca32810f3b2dde34d61812ee5bfd3d97 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Sun, 4 Mar 2018 23:59:14 -0600 Subject: [PATCH] Fixing a bug with Frame::AddImage (convertToFormat) not actually doing anything. It returns a new image, and does not convert the format in-place. --- src/Frame.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Frame.cpp b/src/Frame.cpp index 3de88ab8..c0abb39e 100644 --- a/src/Frame.cpp +++ b/src/Frame.cpp @@ -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 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();