[libcamera-devel] [PATCH 3/3] qcam: viewfinder_qt: Support X RGB variants

Kieran Bingham kieran.bingham at ideasonboard.com
Tue Jul 5 17:31:11 CEST 2022


Support the X variants of the RGB pixel formats
along side the equivalent Alpha component based versions.

Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
---
 src/qcam/viewfinder_qt.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/qcam/viewfinder_qt.cpp b/src/qcam/viewfinder_qt.cpp
index 27955e3f9593..14ecd70a839e 100644
--- a/src/qcam/viewfinder_qt.cpp
+++ b/src/qcam/viewfinder_qt.cpp
@@ -28,8 +28,10 @@ static const QMap<libcamera::PixelFormat, QImage::Format> nativeFormats
 {
 #if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
 	{ libcamera::formats::ABGR8888, QImage::Format_RGBA8888 },
+	{ libcamera::formats::XBGR8888, QImage::Format_RGBA8888 },
 #endif
 	{ libcamera::formats::ARGB8888, QImage::Format_RGB32 },
+	{ libcamera::formats::XRGB8888, QImage::Format_RGB32 },
 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
 	{ libcamera::formats::RGB888, QImage::Format_BGR888 },
 #endif
-- 
2.34.1



More information about the libcamera-devel mailing list