From: Jean-Baptiste Mardelle Date: Tue, 6 Mar 2012 14:05:50 +0000 (+0100) Subject: Fix color scopes for capture devices (webcam,..) X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=c6f29109c54c160e9bbe7717be3def6f60609b94;p=kdenlive Fix color scopes for capture devices (webcam,..) --- 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()); }