ColorPalette 类
定义
定义组成调色板的颜色的数组。Defines an array of colors that make up a color palette. 这些颜色是 32 位 ARGB 颜色。The colors are 32-bit ARGB colors. 不可继承。Not inheritable.
public ref class ColorPalette sealed
public sealed class ColorPalette
type ColorPalette = class
Public NotInheritable Class ColorPalette
- 继承
-
ColorPalette
注解
不允许 ColorPalette 直接构造对象。You are not allowed to construct a ColorPalette object directly. 如果你创建了一个 ColorPalette 对象,则可以针对特定图像操作调色板大小,这是不允许的。If you created a ColorPalette object, you could then manipulate the palette size for a particular image, which is not allowed. 使用 Image.Palette 属性可获取 ColorPalette 对象。Use the Image.Palette property to obtain a ColorPalette object.
调色板中的颜色限制为32位 ARGB 颜色。The colors in the palette are limited to 32-bit ARGB colors. 32位 ARGB 颜色对于 alpha、红色、绿色和蓝色值都有8位。A 32-bit ARGB color has 8 bits each for alpha, red, green, and blue values. 最低8位构成蓝色位,接下来的8位为绿色,接下来的8位为红色,最重要的8位是 alpha。The lowest 8 bits make up the blue bit, the next 8 bits are green, the next 8 bits are red, and the most significant 8 bits are alpha. 这意味着每个组件都可以从0更改为255。This means each component can vary from 0 to 255. 完全开启为255,完全关闭是0。Fully on is 255 and fully off is 0. Alpha 用于使颜色值透明 (alpha = 0) 或不透明 (alpha = 255) 。Alpha is used to make the color value transparent (alpha = 0) or opaque (alpha = 255). 可以增加图像中的强度级别数,而无需增加所使用的颜色数。The number of intensity levels in the image can be increased without increasing the number of colors used. 此过程将创建称为半色调的内容,并以降低分辨率的成本提供增加的对比度。This process creates what is called a halftone, and it offers increased contrast at a cost of decreased resolution.
属性
| Entries | |
| Flags |
获取一个指定如何解释颜色数组中的颜色信息的值。Gets a value that specifies how to interpret the color information in the array of colors. |
方法
| Equals(Object) |
确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object. (继承自 Object) |
| GetHashCode() |
作为默认哈希函数。Serves as the default hash function. (继承自 Object) |
| GetType() |
获取当前实例的 Type。Gets the Type of the current instance. (继承自 Object) |
| MemberwiseClone() |
创建当前 Object 的浅表副本。Creates a shallow copy of the current Object. (继承自 Object) |
| ToString() |
返回表示当前对象的字符串。Returns a string that represents the current object. (继承自 Object) |