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.
This commit is contained in:
David McFarland
2017-12-19 23:53:24 -04:00
committed by Baldur Karlsson
parent 7ae6cc3c37
commit 8119f98c65
+3 -2
View File
@@ -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;