From 8119f98c65d0ae52d4d46c08bf84834e244cd9c4 Mon Sep 17 00:00:00 2001 From: David McFarland Date: Tue, 19 Dec 2017 23:53:24 -0400 Subject: [PATCH] LiveCapture: specify bpl when creating RGB888 thumbnail Qt rounds up the bpl to a multiple of 4 bytes, so this was crashing for me with odd sized thumbnails. --- qrenderdoc/Windows/Dialogs/LiveCapture.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qrenderdoc/Windows/Dialogs/LiveCapture.cpp b/qrenderdoc/Windows/Dialogs/LiveCapture.cpp index 8472d3cae..a9f9b9793 100644 --- a/qrenderdoc/Windows/Dialogs/LiveCapture.cpp +++ b/qrenderdoc/Windows/Dialogs/LiveCapture.cpp @@ -913,8 +913,9 @@ void LiveCapture::captureAdded(uint32_t ID, const QString &executable, const QSt cap->name = executable; cap->api = api; cap->timestamp = timestamp; - cap->thumb = QImage(thumbnail.data(), thumbWidth, thumbHeight, QImage::Format_RGB888) - .copy(0, 0, thumbWidth, thumbHeight); + cap->thumb = + QImage(thumbnail.data(), thumbWidth, thumbHeight, thumbWidth * 3, QImage::Format_RGB888) + .copy(0, 0, thumbWidth, thumbHeight); cap->saved = false; cap->path = path; cap->local = local;