Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/265.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bitmap 来自光栅视频RAM的位图1bpp图像-Windows can';无法打开文件_Bitmap_Raster_File Format - Fatal编程技术网

Bitmap 来自光栅视频RAM的位图1bpp图像-Windows can';无法打开文件

Bitmap 来自光栅视频RAM的位图1bpp图像-Windows can';无法打开文件,bitmap,raster,file-format,Bitmap,Raster,File Format,我正在开发一个英特尔8080CPU仿真器,我需要检查视频RAM在《太空入侵者》游戏中是否正常 我从RAM中获取光栅数据,并创建位图1bpp头,以检查它是如何输出视频的 空间入侵者的分辨率为256x224像素,因此视频RAM为7168字节。这是我的标题: FILEHEADER (14 bytes) 42 4D 36 1C 00 00 00 00 00 00 36 00 00 00 INFOHEADER (40 bytes) 28 00 00 00 00 01 00 00 E0 00 00 00

我正在开发一个英特尔8080CPU仿真器,我需要检查视频RAM在《太空入侵者》游戏中是否正常

我从RAM中获取光栅数据,并创建位图1bpp头,以检查它是如何输出视频的

空间入侵者的分辨率为256x224像素,因此视频RAM为7168字节。这是我的标题:

FILEHEADER (14 bytes)
42 4D
36 1C 00 00
00 00 00 00
36 00 00 00

INFOHEADER (40 bytes)
28 00 00 00
00 01 00 00
E0 00 00 00
01 00
01 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00

RASTER DATA (7168 bytes)
1st ...  31th (bytes for line 1)
32th ... 63th (bytes for line 2)
...           (bytes for line n)
...           (bytes for line 224)
是按小端序排列的

当我试图在Windows 10上打开该文件时,它会给我一个关于不支持的文件的错误


Windows 10是否能够打开位图v3 1bpp图像?

1bpp被视为索引颜色格式(与4bpp和8bpp相同)。因此,颜色表是必需的

因此,您的图像也有类似的外观:

FILEHEADER (14 bytes)
42 4D
3E 1C 00 00  <-- updated
00 00 00 00
3E 00 00 00  <-- updated

INFOHEADER (40 bytes)
28 00 00 00
00 01 00 00
E0 00 00 00
01 00
01 00
00 00 00 00
00 00 00 00 <-- is this correct?
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00

COLOR TABLE (8 bytes)  <-- added
FF FF FF 00
00 00 00 00

RASTER DATA (7168 bytes)
1st ...  31th (bytes for line 1)
32th ... 63th (bytes for line 2)
...           (bytes for line n)
...           (bytes for line 224)
FILEHEADER(14字节)
42 4D

3E 1C 00 001bpp被视为索引颜色格式(与4bpp和8bpp相同)。因此,颜色表是必需的

因此,您的图像也有类似的外观:

FILEHEADER (14 bytes)
42 4D
3E 1C 00 00  <-- updated
00 00 00 00
3E 00 00 00  <-- updated

INFOHEADER (40 bytes)
28 00 00 00
00 01 00 00
E0 00 00 00
01 00
01 00
00 00 00 00
00 00 00 00 <-- is this correct?
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00

COLOR TABLE (8 bytes)  <-- added
FF FF FF 00
00 00 00 00

RASTER DATA (7168 bytes)
1st ...  31th (bytes for line 1)
32th ... 63th (bytes for line 2)
...           (bytes for line n)
...           (bytes for line 224)
FILEHEADER(14字节)
42 4D
3E 1C00 00