This documentation is archived and is not being maintained.

Image.GetPixelFormatSize Method

Returns the color depth (number of bits per pixel) of the specified pixel format.

[Visual Basic]
Public Shared Function GetPixelFormatSize( _
   ByVal pixfmt As PixelFormat _
) As Integer
[C#]
public static int GetPixelFormatSize(
 PixelFormat pixfmt
);
[C++]
public: static int GetPixelFormatSize(
 PixelFormat pixfmt
);
[JScript]
public static function GetPixelFormatSize(
   pixfmt : PixelFormat
) : int;

Parameters

pixfmt
The PixelFormat enumeration member specifying the format for which to find the size.

Return Value

The color depth of the specified pixel format.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Image Class | Image Members | System.Drawing Namespace

Show: