Export (0) Print
Expand All

PixelFormat Enumeration

Specifies the format of the color data for each pixel in the image.

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

public enum class PixelFormat

Member nameDescription
AlphaThe pixel data contains alpha values that are not premultiplied.
CanonicalThe default pixel format of 32 bits per pixel. The format specifies 24-bit color depth and an 8-bit alpha channel.
DontCareNo pixel format is specified.
ExtendedReserved.
Format16bppArgb1555The pixel format is 16 bits per pixel. The color information specifies 32,768 shades of color, of which 5 bits are red, 5 bits are green, 5 bits are blue, and 1 bit is alpha.
Format16bppGrayScaleThe pixel format is 16 bits per pixel. The color information specifies 65536 shades of gray.
Format16bppRgb555Specifies that the format is 16 bits per pixel; 5 bits each are used for the red, green, and blue components. The remaining bit is not used.
Format16bppRgb565Specifies that the format is 16 bits per pixel; 5 bits are used for the red component, 6 bits are used for the green component, and 5 bits are used for the blue component.
Format1bppIndexedSpecifies that the pixel format is 1 bit per pixel and that it uses indexed color. The color table therefore has two colors in it.
Format24bppRgbSpecifies that the format is 24 bits per pixel; 8 bits each are used for the red, green, and blue components.
Format32bppArgbSpecifies that the format is 32 bits per pixel; 8 bits each are used for the alpha, red, green, and blue components.
Format32bppPArgbSpecifies that the format is 32 bits per pixel; 8 bits each are used for the alpha, red, green, and blue components. The red, green, and blue components are premultiplied, according to the alpha component.
Format32bppRgbSpecifies that the format is 32 bits per pixel; 8 bits each are used for the red, green, and blue components. The remaining 8 bits are not used.
Format48bppRgbSpecifies that the format is 48 bits per pixel; 16 bits each are used for the red, green, and blue components.
Format4bppIndexedSpecifies that the format is 4 bits per pixel, indexed.
Format64bppArgbSpecifies that the format is 64 bits per pixel; 16 bits each are used for the alpha, red, green, and blue components.
Format64bppPArgbSpecifies that the format is 64 bits per pixel; 16 bits each are used for the alpha, red, green, and blue components. The red, green, and blue components are premultiplied according to the alpha component.
Format8bppIndexedSpecifies that the format is 8 bits per pixel, indexed. The color table therefore has 256 colors in it.
GdiThe pixel data contains GDI colors.
IndexedThe pixel data contains color-indexed values, which means the values are an index to colors in the system color table, as opposed to individual color values.
MaxThe maximum value for this enumeration.
PAlphaThe pixel format contains premultiplied alpha values.
UndefinedThe pixel format is undefined.

The pixel format defines the number of bits of memory associated with one pixel of data. The format also defines the order of the color components within a single pixel of data.

PixelFormat48bppRGB, PixelFormat64bppARGB, and PixelFormat64bppPARGB use 16 bits per color component (channel). GDI+ version 1.0 and 1.1 can read 16-bits-per-channel images, but such images are converted to an 8-bits-per-channel format for processing, displaying, and saving. Each 16-bit color channel can hold a value in the range 0 through 2^13.

Some of the pixel formats contain premultiplied color values. Premultiplied means that the color values have already been multiplied by an alpha value.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft