mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-12 05:12:39 +00:00
The EPSF binary header is 22 bytes (magic, psStart, psLength, tiffStart, tiffLength, checksum), so the TIFF section is at 12/16 — not at 20/24, which is the checksum plus the first two bytes of the PostScript section and always lands past the end of a real file. A legacy DOS EPS therefore never showed its preview: it fell back to drawn rectangles or the grey placeholder. The old fixture encoded the same wrong layout, so it could not catch it. Read tiffStart/tiffLength at 12/16, document the header, and rebuild the fixture on the real layout. Regression: the fixture test fails on main (pixel_size 201x101 — the stand-in) and passes with the fix (10x5 — the preview).