You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

自制RLE8压缩BMP大尺寸简单图像在Apple阅读器无法识别求助

RLE8压缩BMP在Apple阅读器中的兼容性问题

编写采用RLE8压缩的BMP图像文件时出现异常:多数生成文件可被标准阅读器识别,但含大面积空白的大尺寸(≥512x512)图像无法被Apple的Preview、FreeForm、ColorSync Utility等阅读器识别,仅小尺寸同类图像或复杂图案的大尺寸图像可正常识别。微软Paint等应用可正常显示所有文件。

经对比,生成的RLE8压缩BMP文件的头文件、颜色表、RLE编码格式与他人生成的可识别文件一致,问题仅存在于Apple阅读器中。以下为示例文件信息:

被标记为无效的文件(1024x64)

BM                     BM
file_size              1846
reserved1              0
reserved2              0
offset_to_pixels       1078
info_header_size       40
xpix                   1024
ypix                   64
planes                 1
bits_per_pixel         8
compression            1
bytes_in_pixel_block   768
xpixelspermeter        0
ypixelspermeter        0
colors_used            256
colors_important       256

RLE编码块(无效)

Line  0: 255,111 255,111 255,111 255,111 4,111 0, 0
Line  1: 255,111 255,111 255,111 255,111 4,111 0, 0
...
Line 63: 255,111 255,111 255,111 255,111 4,111 0, 1

可正常识别的文件(1024x32)

BM                     BM
file_size              1462
reserved1              0
reserved2              0
offset_to_pixels       1078
info_header_size       40
xpix                   1024
ypix                   32
planes                 1
bits_per_pixel         8
compression            1
bytes_in_pixel_block   384
xpixelspermeter        0
ypixelspermeter        0
colors_used            256
colors_important       256

RLE编码块(有效)

Line  0: 255,111 255,111 255,111 255,111 4,111 0, 0
Line  1: 255,111 255,111 255,111 255,111 4,111 0, 0
...
Line 31: 255,111 255,111 255,111 255,111 4,111 0, 1

两款文件仅行数及对应头文件参数不同,RLE编码逻辑一致,大尺寸文件却被标记无效。请问这是否是Apple阅读器的限制?有无可行的解决办法?


内容的提问来源于stack exchange,提问作者DavidKeller

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.18 03:46:05