mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-09 13:07:41 +00:00
File › Open and File › Place refused a JPEG XL file: Open said it was not a format VectorCraft reads, and the dialogs did not list .jxl. A read-only JPEG XL format joins the format table. Open, Place, drops, copied files and Glass's Load Texture tell it by its first bytes (a bare codestream or the ISOBMFF container). jxl-oxide 0.12.6 (pure Rust, MIT OR Apache-2.0, without its default rayon feature) decodes the first frame, which is stored as a PNG. Orientation is applied, and 16-bit and floating-point samples become 8 bits. Colors are converted to sRGB in XYB-encoded images and when the header names the color space or the ICC profile describes one jxl-oxide knows; other images with an ICC profile keep their samples. Premultiplied colors are divided by alpha before that conversion. CMYK files are refused. The decoder gets only a container's image boxes. It reads the header first, and an image past MAX_RASTER_ALLOC gets the existing "too large to draw" error before any pixels are decoded. Its image buffers are capped at 16 times the image's RGBA size plus 16 MiB, and at most MAX_RASTER_ALLOC. VectorCraft doesn't write JPEG XL yet. Docs: docs/mcp.md, docs/file-format-parity.md, docs/target-app-parity.md, README.