RGB24 and BGR24 cleanup (#1749)

* RGB24 and BGR24 cleanup

* Fix MF-Grabber

* Add BGR32 to V42L Grabber

* Add BGR32 to V42L Grabber

* Add BGR16 to V42L

* Revert "Add BGR16 to V42L"

This reverts commit 42975380f4.
This commit is contained in:
LordGrey
2024-06-01 20:26:20 +02:00
committed by GitHub
parent 76fff98f5c
commit 15c305b8f2
4 changed files with 62 additions and 12 deletions

View File

@@ -10,6 +10,7 @@ enum class PixelFormat {
YUYV,
UYVY,
BGR16,
RGB24,
BGR24,
RGB32,
BGR32,
@@ -36,6 +37,10 @@ inline PixelFormat parsePixelFormat(const QString& pixelFormat)
{
return PixelFormat::BGR16;
}
else if (format.compare("rgb24") == 0)
{
return PixelFormat::RGB24;
}
else if (format.compare("bgr24") == 0)
{
return PixelFormat::BGR24;
@@ -80,6 +85,10 @@ inline QString pixelFormatToString(const PixelFormat& pixelFormat)
{
return "BGR16";
}
else if (pixelFormat == PixelFormat::RGB24)
{
return "RGB24";
}
else if (pixelFormat == PixelFormat::BGR24)
{
return "BGR24";