fix: pixel format

This commit is contained in:
Haibo 2023-09-12 10:11:53 +08:00
parent 4b9f4b11f9
commit 76b3b4fbed
2 changed files with 1299 additions and 1291 deletions

View File

@ -46,7 +46,13 @@ inline const GUID& ConvertPixelFormat(PixelFormat format, UINT& stride)
return GUID_WICPixelFormat32bppRGB; return GUID_WICPixelFormat32bppRGB;
case PixelFormat::Bpp32RGBA: case PixelFormat::Bpp32RGBA:
stride = 4; stride = 4;
return GUID_WICPixelFormat32bppRGB; return GUID_WICPixelFormat32bppRGBA;
case PixelFormat::Bpp32BGR:
stride = 3;
return GUID_WICPixelFormat32bppBGR;
case PixelFormat::Bpp32BGRA:
stride = 4;
return GUID_WICPixelFormat32bppBGRA;
default: default:
return GUID_WICPixelFormatDontCare; return GUID_WICPixelFormatDontCare;
} }

View File

@ -56,6 +56,8 @@ enum class PixelFormat
{ {
Bpp32RGB, Bpp32RGB,
Bpp32RGBA, Bpp32RGBA,
Bpp32BGR,
Bpp32BGRA,
}; };
/** /**