excalidraw/excalidraw

move to `iTXt` png chunks

Open

#9.269 geöffnet am 13. März 2025

Auf GitHub ansehen
 (4 Kommentare) (1 Reaktion) (1 zugewiesene Person)TypeScript (13.649 Forks)batch import
good first issue

Repository-Metriken

Stars
 (123.243 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 5T 7h) (18 gemergte PRs in 30 T)

Beschreibung

When encoding scene data to PNGs (see https://github.com/excalidraw/excalidraw/blob/master/packages/excalidraw/data/image.ts)

turns out tEXt chunks support latin1 only, but we're encoding the data as utf8. Browsers don't care, but it may throw off other PNG decoders.

Instead, we should use iTXt chunks which support utf8.

https://www.npmjs.com/package/png-itxt png-chunk-itxt

We still need to keep tEXt support for backwards compat.

Contributor Guide