PeachImage
PeachImage
PixelFormatExtensions Class
Helper methods for reasoning about PixelFormat values.
public static class PixelFormatExtensions
Inheritance System.Object → PixelFormatExtensions
| Methods | |
|---|---|
| GetBytesPerPixel(this PixelFormat) | Gets the number of bytes a single pixel occupies for the given format. |
| GetBytesPerSample(this PixelFormat) | Gets the number of bytes a single sample (channel value) occupies for the given format. |
| GetChannelCount(this PixelFormat) | Gets the number of color/alpha channels for the given format. |
| HasAlpha(this PixelFormat) | Gets whether the given format has an alpha channel. Note Cmyk32 has 4 channels but is not alpha. |