Skip to content

Commit 81f85ba

Browse files
committed
use srgb color space
1 parent a0c3ee6 commit 81f85ba

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/libcameracamera.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <libcamera/framebuffer_allocator.h>
99
#include <qvideoframe.h>
1010
#include <sys/mman.h>
11+
#include <QColorSpace>
1112

1213
using namespace libcamera;
1314

@@ -494,6 +495,7 @@ QImage LibCameraWorker::convertBufferToImage(
494495
cfg.size.height,
495496
cfg.stride,
496497
QImage::Format_RGB888);
498+
temp.setColorSpace(QColorSpace::SRgb);
497499
image = temp.copy();
498500
} else if (cfg.pixelFormat == libcamera::formats::BGR888) {
499501
QImage temp(static_cast<const uchar *>(memory),

0 commit comments

Comments
 (0)