我有非常大的(20000x20000+)原始图像文件,其中每个像素由 3 个字节表示。我知道每个图像的分辨率。示例(对于 4x4 图像):
+----------------+----------------+----------------+----------------+
| | | | |
| R G B | R G B | R G B | R G B |
| 0x00 0x01 0x02 | 0x03 0x04 0x05 | 0x06 0x07 0x08 | 0x09 0x0A 0x0B |
| | | | |
+----------------+----------------+----------------+----------------+
| | | | |
| R G B | R G B | R G B | R G B |
| 0x0C 0x0D 0x0E | 0x0F 0x10 0x11 | 0x12 0x13 0x14 | 0x15 0x16 0x17 |
| | | | |
+----------------+----------------+----------------+----------------+
| | | | |
| R G B | R G B | R G B | R G B |
| 0x18 0x19 0x1A | 0x1B 0x1C 0x1D | 0x1E 0x1F 0x20 | 0x21 0x22 0x23 |
| | | | |
+----------------+----------------+----------------+----------------+
| | | | |
| R G B | R G B | R G B | R G B |
| 0x24 0x25 0x26 | 0x27 0x28 0x29 | 0x2A 0x2B 0x2C | 0x2D 0x2E 0x2F |
| | | | |
+----------------+----------------+----------------+----------------+
如何将它们转换为BMP
图像?