[libcamera-devel] [PATCH] qcam: Add support for RGB565

Kieran Bingham kieran.bingham at ideasonboard.com
Mon Oct 23 14:20:55 CEST 2023


Quoting Daniel Scally via libcamera-devel (2023-10-23 09:22:16)
> Qt supports RGB565 natively; add support for the format by mapping
> the libcamera format to Qt's representation of it.
> 

Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>

> Signed-off-by: Daniel Scally <dan.scally at ideasonboard.com>
> ---
>  src/apps/qcam/viewfinder_qt.cpp | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/apps/qcam/viewfinder_qt.cpp b/src/apps/qcam/viewfinder_qt.cpp
> index 597ccffc..62ed5e7c 100644
> --- a/src/apps/qcam/viewfinder_qt.cpp
> +++ b/src/apps/qcam/viewfinder_qt.cpp
> @@ -36,6 +36,7 @@ static const QMap<libcamera::PixelFormat, QImage::Format> nativeFormats
>         { libcamera::formats::RGB888, QImage::Format_BGR888 },
>  #endif
>         { libcamera::formats::BGR888, QImage::Format_RGB888 },
> +       { libcamera::formats::RGB565, QImage::Format_RGB16 },
>  };
>  
>  ViewFinderQt::ViewFinderQt(QWidget *parent)
> -- 
> 2.34.1
>


More information about the libcamera-devel mailing list