From 2ac82d18f50fb54b898e5e55dcb7fd5394437112 Mon Sep 17 00:00:00 2001 From: hey-red Date: Sun, 3 Jan 2021 22:53:34 +0300 Subject: [PATCH] Added rgba32 pixel format --- FFMediaToolkit/Graphics/ImageData.cs | 4 +++- FFMediaToolkit/Graphics/ImagePixelFormat.cs | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/FFMediaToolkit/Graphics/ImageData.cs b/FFMediaToolkit/Graphics/ImageData.cs index 4c882ec..b63a7c8 100644 --- a/FFMediaToolkit/Graphics/ImageData.cs +++ b/FFMediaToolkit/Graphics/ImageData.cs @@ -164,6 +164,8 @@ private static double GetBytesPerPixel(ImagePixelFormat format) return 4; case ImagePixelFormat.Rgb24: return 3; + case ImagePixelFormat.Rgba32: + return 4; case ImagePixelFormat.Argb32: return 4; case ImagePixelFormat.Uyvy422: @@ -179,4 +181,4 @@ private static double GetBytesPerPixel(ImagePixelFormat format) } } } -} +} \ No newline at end of file diff --git a/FFMediaToolkit/Graphics/ImagePixelFormat.cs b/FFMediaToolkit/Graphics/ImagePixelFormat.cs index f145e36..5d72221 100644 --- a/FFMediaToolkit/Graphics/ImagePixelFormat.cs +++ b/FFMediaToolkit/Graphics/ImagePixelFormat.cs @@ -22,6 +22,11 @@ public enum ImagePixelFormat /// Rgb24 = AVPixelFormat.AV_PIX_FMT_RGB24, + /// + /// Represents a RGBA(with alpha channel) 32bpp bitmap pixel format. + /// + Rgba32 = AVPixelFormat.AV_PIX_FMT_RGBA, + /// /// Represents a ARGB(with alpha channel) 32bpp bitmap pixel format. /// @@ -47,4 +52,4 @@ public enum ImagePixelFormat /// Yuv420 = AVPixelFormat.AV_PIX_FMT_YUV420P, } -} +} \ No newline at end of file