Commit Graph
6 Commits
Author SHA1 Message Date
dotCooCoo a524687f93 file-formats: register JPEG-LS and tell it from JPEG
craft-image-codecs reads and writes JPEG-LS since #1576, but the
format registry had no entry for it. A `.jls` name resolved to no
format, and a JPEG-LS file was reported as JPEG because both start
with `FF D8 FF`.

`Format::JpegLs` now has the `jls` extension, the `image/jls` media
type and the codec mapping, so its capabilities come from the codec.

A file that starts with `FF D8 FF` is JPEG-LS when its marker segments
lead to an SOF55 frame header (`FF F7`). The walk follows
`jpeg_frame_from` in craft-image-codecs, which a build without the
`raster-codecs` feature does not link, and reads at most the first
1 MiB. When the bytes end before any frame header, a `.jls` name gives
JPEG-LS and any other name gives JPEG.

craft-file-import routes `JpegLs` to its raster reader and lists `jls`
and `image/jls`, so a JPEG-LS file still imports as it did when it was
detected as JPEG.

Follows #1576.
2026-11-19 11:02:50 -08:00
Dylan M. Taylor b96cc6b3ce Group shared writer paths by layer 2026-11-13 08:00:22 -05:00
Dylan M. Taylor b5dfdb0bda Fix shared file import edge cases 2026-11-13 07:50:09 -05:00
Dylan M. Taylor 8748f70aea Expose multi-page PDF writer for neutral scenes 2026-11-13 07:36:18 -05:00
Dylan M. Taylor 2a8bb6a4e3 Harden neutral vector import and shared output 2026-11-13 07:36:18 -05:00
Dylan M. Taylor 62e2328905 Add shared neutral file import and writer registry 2026-11-13 07:36:18 -05:00