Image.GetPixelFormatSize

Image.GetPixelFormatSize method

Returns the color depth, in number of bits per pixel, of the specified pixel format.

public static int GetPixelFormatSize(PixelFormat pixfmt)
ParameterTypeDescription
pixfmtPixelFormatThe PixelFormat member that specifies the format for which to find the size.

Return Value

The color depth of the specified pixel format.

See Also