以下常量指定位图中使用的各种像素格式。
PowerBASIC语法
%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
指定格式为每像素1位,进行索引。
PixelFormat4bppIndexed?
197634
指定格式为每像素4位,进行索引。
PixelFormat8bppIndexed?
198659
指定格式为每像素8位,进行索引。
PixelFormat16bppARGB1555?
397319
指定格式为每像素16位; 1位用于alpha分量,每个5位用于红色,绿色和蓝色分量。
PixelFormat16bppGrayScale?
1052676
指定格式为每像素16位灰度。
PixelFormat16bppRGB555?
135173
指定格式为每像素16位;每个5位用于红色,绿色和蓝色组件。剩余的位不被使用。
PixelFormat16bppRGB565?
135174
指定格式为每像素16位;红色分量使用5位,绿色分量使用6位,蓝色分量使用5位。
PixelFormat24bppRGB?
137224
指定格式为每像素24位;每个8位用于红色,绿色和蓝色组件。
PixelFormat32bppARGB?
2498570
指定格式为每像素32位;每个8位用于alpha,red,green和blue组件。
PixelFormat32bppPARGB?
925707
指定格式为每像素32位;每个8位用于alpha,red,green和blue组件。红色,绿色和蓝色组件根据Alpha组件预乘。
PixelFormat32bppRGB?
139273
指定格式为每像素32位;每个8位用于红色,绿色和蓝色组件。剩余的8位不被使用。
PixelFormat48bppRGB?
1060876
指定格式为每像素48位;红色,绿色和蓝色组件都使用16位。
PixelFormat64bppARGB?
3424269
指定格式为每像素64位; 16位用于alpha,red,green和blue组件。
PixelFormat64bppPARGB?
29622286
指定格式为每像素64位; 16位用于alpha,red,green和blue组件。红色,绿色和蓝色组件根据Alpha组件预乘。
备注
PixelFormat48bppRGB,PixelFormat64bppARGB和PixelFormat64bppPARGB每个颜色组件(通道)使用16位。Microsoft Windows GDI +版本1.0可以读取每通道16位图像,但是这些图像将被转换为每通道8位格式进行处理,显示和保存。


