Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
radek-k committed Jan 15, 2021
2 parents c1b5e09 + 9855f14 commit 08d97a2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion FFMediaToolkit/Graphics/ImageData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -179,4 +181,4 @@ private static double GetBytesPerPixel(ImagePixelFormat format)
}
}
}
}
}
7 changes: 6 additions & 1 deletion FFMediaToolkit/Graphics/ImagePixelFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ public enum ImagePixelFormat
/// </summary>
Rgb24 = AVPixelFormat.AV_PIX_FMT_RGB24,

/// <summary>
/// Represents a RGBA(with alpha channel) 32bpp bitmap pixel format.
/// </summary>
Rgba32 = AVPixelFormat.AV_PIX_FMT_RGBA,

/// <summary>
/// Represents a ARGB(with alpha channel) 32bpp bitmap pixel format.
/// </summary>
Expand All @@ -47,4 +52,4 @@ public enum ImagePixelFormat
/// </summary>
Yuv420 = AVPixelFormat.AV_PIX_FMT_YUV420P,
}
}
}

0 comments on commit 08d97a2

Please sign in to comment.