以下常量指定位图中使用的各种像素格式。
FreeBASIC 语法
PixelFormat1bppIndexed = 196865
PixelFormat4bppIndexed = 197634
PixelFormat8bppIndexed = 198659
PixelFormat16bppGrayScale = 1052676
PixelFormat16bppRGB555 = 135173
PixelFormat16bppRGB565 = 135174
PixelFormat16bppARGB1555 = 397319
PixelFormat24bppRGB = 137224
PixelFormat32bppRGB = 139273
PixelFormat32bppARGB = 2498570
PixelFormat32bppPARGB = 925707
PixelFormat48bppRGB = 1060876
PixelFormat64bppARGB = 3424269
PixelFormat64bppPARGB = 29622286
PixelFormatMax = 15
常数
PixelFormat1bppIndexed?
196865
Specifies that the format is 1 bit per pixel, indexed.
PixelFormat4bppIndexed?
197634
Specifies that the format is 4 bits per pixel, indexed.
PixelFormat8bppIndexed?
198659
Specifies that the format is 8 bits per pixel, indexed.
PixelFormat16bppARGB1555?
397319
Specifies that the format is 16 bits per pixel; 1 bit is used for the alpha component, and 5 bits each are used for the red, green, and blue components.
PixelFormat16bppGrayScale?
1052676
Specifies that the format is 16 bits per pixel, grayscale.
PixelFormat16bppRGB555?
135173
Specifies 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.
PixelFormat16bppRGB565?
135174
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.
PixelFormat24bppRGB?
137224
Specifies that the format is 24 bits per pixel; 8 bits each are used for the red, green, and blue components.
PixelFormat32bppARGB?
2498570
Specifies that the format is 32 bits per pixel; 8 bits each are used for the alpha, red, green, and blue components.
PixelFormat32bppPARGB?
925707
Specifies 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.
PixelFormat32bppRGB?
139273
Specifies 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.
PixelFormat48bppRGB?
1060876
Specifies that the format is 48 bits per pixel; 16 bits each are used for the red, green, and blue components.
PixelFormat64bppARGB?
3424269
Specifies that the format is 64 bits per pixel; 16 bits each are used for the alpha, red, green, and blue components.
PixelFormat64bppPARGB?
29622286
Specifies 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.
备注
PixelFormat48bppRGB, PixelFormat64bppARGB, and PixelFormat64bppPARGB use 16 bits per color component (channel). Microsoft Windows GDI+ version 1.0 can read 16-bits-per-channel images, but such images are converted to an 8-bits-per-channel format for processing, displaying, and saving.