mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-14 19:26:56 -04:00
moxcms's encode packs tagged elements back to back, so the built-in sRGB profile embedded in JPEG, TIFF and PSD exports was 634 bytes with `cprt` at offset 558, where ICC.1 §7.1.2 requires every tagged element on a 4-byte boundary (stricter readers reject the files). encode now lays the tag data out again with each element padded, updating the tag offsets, the size and the profile ID (zeroed, "not computed"); tags that share data keep sharing it. Reported to moxcms as awxkee/moxcms#198. Fixes #1584