Image.GetPixelFormatSize Method (PixelFormat)

 

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

Namespace:   System.Drawing
Assembly:  System.Drawing (in System.Drawing.dll)

public static int GetPixelFormatSize(
	PixelFormat pixfmt
)

Parameters

pixfmt
Type: System.Drawing.Imaging.PixelFormat

The PixelFormat member that specifies the format for which to find the size.

Return Value

Type: System.Int32

The color depth of the specified pixel format.

.NET Framework
Available since 1.1
Return to top
Show: