From c6f29109c54c160e9bbe7717be3def6f60609b94 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Mardelle Date: Tue, 6 Mar 2012 15:05:50 +0100 Subject: [PATCH] Fix color scopes for capture devices (webcam,..) --- src/mltdevicecapture.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mltdevicecapture.cpp b/src/mltdevicecapture.cpp index 2cddcad1..b45acbb7 100644 --- a/src/mltdevicecapture.cpp +++ b/src/mltdevicecapture.cpp @@ -235,12 +235,12 @@ void MltDeviceCapture::emitFrameUpdated(Mlt::Frame& frame) } */ - mlt_image_format format = mlt_image_rgb24; + mlt_image_format format = mlt_image_rgb24a; int width = 0; int height = 0; const uchar* image = frame.get_image(format, width, height); - QImage qimage(width, height, QImage::Format_ARGB32); - memcpy(qimage.bits(), image, width * height * 3); + QImage qimage(width, height, QImage::Format_ARGB32_Premultiplied); + memcpy(qimage.bits(), image, width * height * 4); emit frameUpdated(qimage.rgbSwapped()); } -- 2.39.2