PixelFormat
System.Drawing.Imaging.PixelFormat
Namespace: System.Drawing.Imaging
Assembly: System.Drawing.Managed (4.0.0.0)
Specifies the format of the color data for each pixel in the image.
public enum PixelFormat : EnumPublic Enum PixelFormat As [Enum]Fields
Alpha
Specifies that pixel data contains alpha values that are not pre-multiplied.
Canonical
The default pixel format of 32 bits per pixel. The format specifies 24-bit color depth and an 8-bit alpha channel.
DontCare
Specifies that pixel format is a don't care.
Extended
Reserved.
Format16bppArgb1555
Specifies that pixel format is 16 bits per pixel. The color information specifies 32768 shades of color of which 5 bits are red, 5 bits are green, 5 bits are blue and 1 bit is alpha.
Format16bppGrayScale
The pixel format is 16 bits per pixel. The color information specifies 65536 shades of gray.
Format16bppRgb555
Specifies that pixel format is 16 bits per pixel. The color information specifies 65536 shades of gray.
Format16bppRgb565
Specifies that pixel format is 16 bits per pixel. The color information specifies 32768 shades of color of which 5 bits are red, 5 bits are green and 5 bits are blue.
Format1bppIndexed
Specifies that pixel format is 1 bit per pixel indexed color. The color table therefore has two colors in it.
Format24bppRgb
Specifies that pixel format is 24 bits per pixel. The color information specifies 16777216 shades of color of which 8 bits are red, 8 bits are green and 8 bits are blue.
Format32bppArgb
Specifies that pixel format is 32 bits per pixel. The color information specifies 16777216 shades of color of which 8 bits are red, 8 bits are green and 8 bits are blue. The 8 additional bits are alpha bits.
Format32bppPArgb
Specifies that pixel format is 32 bits per pixel. The color information specifies 16777216 shades of color of which 8 bits are red, 8 bits are green and 8 bits are blue. The 8 additional bits are pre-multiplied alpha bits.
Format32bppRgb
Specifies that pixel format is 24 bits per pixel. The color information specifies 16777216 shades of color of which 8 bits are red, 8 bits are green and 8 bits are blue.
Format48bppRgb
Specifies that pixel format is 48 bits per pixel. The color information specifies 16777216 shades of color of which 8 bits are red, 8 bits are green and 8 bits are blue. The 8 additional bits are alpha bits.
Format4bppIndexed
Specifies that pixel format is 4 bits per pixel indexed color. The color table therefore has 16 colors in it.
Format64bppArgb
Specifies pixel format is 64 bits per pixel. The color information specifies 16777216 shades of color of which 16 bits are red, 16 bits are green and 16 bits are blue. The 16 additional bits are alpha bits.
Format64bppPArgb
Specifies that pixel format is 64 bits per pixel. The color information specifies 16777216 shades of color of which 16 bits are red, 16 bits are green and 16 bits are blue. The 16 additional bits are pre-multiplied alpha bits.
Format8bppIndexed
Specifies that pixel format is 8 bits per pixel indexed color. The color table therefore has 256 colors in it.
Gdi
Specifies that pixel data contains GDI colors.
Indexed
Specifies that pixel data contains color indexed values which means they are an index to colors in the system color table, as opposed to individual color values.
Max
Specifies that pixel format is 64 bits per pixel. The color information specifies 16777216 shades of color of which 16 bits are red, 16 bits are green and 16 bits are blue. The 16 additional bits are alpha bits.
PAlpha
Specifies that pixel format contains pre-multiplied alpha values.
Undefined
Specifies that pixel format is undefined.
Used By
Creates a copy of the section of this Bitmap defined by with a specified PixelFormat.
Locks a portion of the bitmap for direct pixel manipulation.
Gets the pixel format for this Image.
Returns the color depth, in number of bits per pixel, of the specified pixel format.
Returns a value that indicates whether the pixel format for this Image contains alpha information.
Returns a value that indicates whether the pixel format is 64 bits per pixel.
Returns a value that indicates whether the pixel format is 32 bits per pixel.
Gets or sets the format of the pixel information in this Bitmap.
Last updated
Was this helpful?