Files
rosetta/docs/FORMATS.md
T
4DBug ba91879bc5 imgA: codecs/Lzw (GIF LSB + TIFF MSB early-change, old-style TIFF LZW) with Pillow / libtiff fixtures; api passes opts.decodeImage / encodeImage hooks to formats (embedded PNG in ICO, JPEG in TIFF)
Change outside the ws folders: src/Formats/init.luau gains withHooks(): F.load / F.save hand decoders / encoders
opts.decodeImage(buf) and opts.encodeImage(img, format) unless the caller passed its own, so a format can decode an
embedded image of another format without requiring it (LAYERS). Backward compatible: formats ignore unknown opts.
2026-10-31 08:25:55 -05:00

748 B

Formats

GENERATED by tools/gen_registry.py from each format's contract (caps) - do not edit. Every format listed here is tested under both runtimes (luau --codegen -O2 and LuaJIT through the build) by bash tools/test.sh.

Category Format Extensions Read Write Capabilities Test
image png .png .apng yes yes animation: false, alpha: true, depths: 1, 2, 4, 8, 16 tests/image/png.luau

Codecs (layer 1, shared by formats; not loadable on their own):

  • codecs/Deflate: DEFLATE (RFC 1951) decoder and compressor, with the zlib (RFC 1950) and gzip (RFC 1952) wrappers.
  • codecs/Lzw: LZW decoder and encoder in the two variants file formats use. A codec (layer 1): image/gif and