]> git.sesse.net Git - kdenlive/blobdiff - src/mltdevicecapture.cpp
Fix color scopes for capture devices (webcam,..)
[kdenlive] / src / mltdevicecapture.cpp
index 2cddcad17e258980ab16b5712b336f9938ca3d30..b45acbb7c8c56043e6bb6c9a4f6e1ed766a546d4 100644 (file)
@@ -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());
 }