PixelFormat PixelFormat PixelFormat PixelFormat Enum

定义

指定图像中每个像素的颜色数据的格式。Specifies the format of the color data for each pixel in the image.

public enum class PixelFormat
public enum PixelFormat
type PixelFormat = 
Public Enum PixelFormat
继承

字段

Alpha Alpha Alpha Alpha 262144

像素数据包含没有进行过自左乘的 alpha 值。The pixel data contains alpha values that are not premultiplied.

Canonical Canonical Canonical Canonical 2097152

默认像素格式,每像素 32 位。The default pixel format of 32 bits per pixel. 此格式指定 24 位颜色深度和一个 8 位 alpha 通道。The format specifies 24-bit color depth and an 8-bit alpha channel.

DontCare DontCare DontCare DontCare 0

没有指定像素格式。No pixel format is specified.

Extended Extended Extended Extended 1048576

保留。Reserved.

Format16bppArgb1555 Format16bppArgb1555 Format16bppArgb1555 Format16bppArgb1555 397319

像素格式为每像素 16 位。The pixel format is 16 bits per pixel. 该颜色信息指定 32,768 种色调,其中 5 位为红色,5 位为绿色,5 位为蓝色,1 位为 alpha。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.

Format16bppGrayScale Format16bppGrayScale Format16bppGrayScale Format16bppGrayScale 1052676

像素格式为每像素 16 位。The pixel format is 16 bits per pixel. 该颜色信息指定 65536 种灰色调。The color information specifies 65536 shades of gray.

Format16bppRgb555 Format16bppRgb555 Format16bppRgb555 Format16bppRgb555 135173

指定格式为每像素 16 位;红色、绿色和蓝色分量各使用 5 位。Specifies that the format is 16 bits per pixel; 5 bits each are used for the red, green, and blue components. 剩余的 1 位未使用。The remaining bit is not used.

Format16bppRgb565 Format16bppRgb565 Format16bppRgb565 Format16bppRgb565 135174

指定格式为每像素 16 位;红色分量使用 5 位,绿色分量使用 6 位,蓝色分量使用 5 位。Specifies 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.

Format1bppIndexed Format1bppIndexed Format1bppIndexed Format1bppIndexed 196865

指定像素格式为每像素 1 位,并指定它使用索引颜色。Specifies that the pixel format is 1 bit per pixel and that it uses indexed color. 因此颜色表中有两种颜色。The color table therefore has two colors in it.

Format24bppRgb Format24bppRgb Format24bppRgb Format24bppRgb 137224

指定格式为每像素 24 位;红色、绿色和蓝色分量各使用 8 位。Specifies that the format is 24 bits per pixel; 8 bits each are used for the red, green, and blue components.

Format32bppArgb Format32bppArgb Format32bppArgb Format32bppArgb 2498570

指定格式为每像素 32 位;alpha、红色、绿色和蓝色分量各使用 8 位。Specifies that the format is 32 bits per pixel; 8 bits each are used for the alpha, red, green, and blue components.

Format32bppPArgb Format32bppPArgb Format32bppPArgb Format32bppPArgb 925707

指定格式为每像素 32 位;alpha、红色、绿色和蓝色分量各使用 8 位。Specifies that the format is 32 bits per pixel; 8 bits each are used for the alpha, red, green, and blue components. 根据 alpha 分量,对红色、绿色和蓝色分量进行自左乘。The red, green, and blue components are premultiplied, according to the alpha component.

Format32bppRgb Format32bppRgb Format32bppRgb Format32bppRgb 139273

指定格式为每像素 32 位;红色、绿色和蓝色分量各使用 8 位。Specifies that the format is 32 bits per pixel; 8 bits each are used for the red, green, and blue components. 剩余的 8 位未使用。The remaining 8 bits are not used.

Format48bppRgb Format48bppRgb Format48bppRgb Format48bppRgb 1060876

指定格式为每像素 48 位;红色、绿色和蓝色分量各使用 16 位。Specifies that the format is 48 bits per pixel; 16 bits each are used for the red, green, and blue components.

Format4bppIndexed Format4bppIndexed Format4bppIndexed Format4bppIndexed 197634

指定格式为每像素 4 位而且已创建索引。Specifies that the format is 4 bits per pixel, indexed.

Format64bppArgb Format64bppArgb Format64bppArgb Format64bppArgb 3424269

指定格式为每像素 64 位;alpha、红色、绿色和蓝色分量各使用 16 位。Specifies that the format is 64 bits per pixel; 16 bits each are used for the alpha, red, green, and blue components.

Format64bppPArgb Format64bppPArgb Format64bppPArgb Format64bppPArgb 1851406

指定格式为每像素 64 位;alpha、红色、绿色和蓝色分量各使用 16 位。Specifies that the format is 64 bits per pixel; 16 bits each are used for the alpha, red, green, and blue components. 根据 alpha 分量,对红色、绿色和蓝色分量进行自左乘。The red, green, and blue components are premultiplied according to the alpha component.

Format8bppIndexed Format8bppIndexed Format8bppIndexed Format8bppIndexed 198659

指定格式为每像素 8 位而且已创建索引。Specifies that the format is 8 bits per pixel, indexed. 因此颜色表中有 256 种颜色。The color table therefore has 256 colors in it.

Gdi Gdi Gdi Gdi 131072

像素数据包含 GDI 颜色。The pixel data contains GDI colors.

Indexed Indexed Indexed Indexed 65536

该像素数据包含颜色索引值,这意味着这些值是系统颜色表中颜色的索引,而不是单个颜色值。The 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.

Max Max Max Max 15

此枚举的最大值。The maximum value for this enumeration.

PAlpha PAlpha PAlpha PAlpha 524288

像素格式包含自左乘的 alpha 值。The pixel format contains premultiplied alpha values.

Undefined Undefined Undefined Undefined 0

未定义像素格式。The 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 和 PixelFormat64bppPARGB 使用每个颜色组件 (通道) 的 16 位。PixelFormat48bppRGB, PixelFormat64bppARGB, and PixelFormat64bppPARGB use 16 bits per color component (channel). GDI + 1.0 和 1.1 版可以读取 16 位 / 通道的图像,但此类映像转换为 8 位 / 通道格式用于处理、 显示和保存。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. 每个 16 位颜色通道可以在范围 0 到 2 中保存值 ^13。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. 预乘的意味着,已具有已颜色值乘以 alpha 值。Premultiplied means that the color values have already been multiplied by an alpha value.

适用于