mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-29 04:27:30 -06:00
New crate `lightcraft-heif` (a port of PhotoCraft's photocraft-heif): a thin, panic-guarded wrapper around heic-rs (pure Rust, pinned =0.1.1) - 8/10-bit, alpha, grid tiles, container irot/imir/clap, ICC/EXIF/XMP. `lightcraft-codecs` decodes HEIF behind its non-default `heif` feature (HEVC patents are the distributor's call, the same policy as PhotoCraft); the apps forward it. HEIC files stay recognised without the feature: opening one is a clear "isn't included in this build" error. Fuzz-found heic-rs panics arrive as regression fixtures (inline bytes, no media committed). Verified end-to-end on real iPhone HEICs (lightcraft-cli render, rotation and metadata correct). Note for reviewers: measured here, the engine currently ignores the decoded image's source-space matrix on export for ANY format (a true Display-P3 PNG round-trips unchanged); the ICC and space are carried for all codecs, so this inherits - and does not worsen - existing behaviour. Co-Authored-By: opencode <noreply@opencode.ai>
47 lines
1.6 KiB
TOML
47 lines
1.6 KiB
TOML
[package]
|
|
name = "lightcraft-codecs"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
description = "LightCraft standard image codecs: sniffing, decode to linear light, ICC, encoders (L1)"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
lightcraft-geom = { workspace = true }
|
|
lightcraft-color = { workspace = true }
|
|
lightcraft-raster = { workspace = true }
|
|
lightcraft-heif = { workspace = true, optional = true }
|
|
serde = { workspace = true }
|
|
bytemuck = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
rayon = { workspace = true, optional = true }
|
|
image = { workspace = true, features = ["gif", "bmp"] }
|
|
zune-jpeg = { workspace = true }
|
|
zune-core = { workspace = true }
|
|
jpeg-decoder = { workspace = true }
|
|
jpeg-encoder = { workspace = true }
|
|
png = { workspace = true }
|
|
tiff = { workspace = true }
|
|
image-webp = { workspace = true }
|
|
moxcms = { workspace = true }
|
|
jxl-oxide = { workspace = true, optional = true }
|
|
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
|
ravif = { workspace = true, optional = true }
|
|
|
|
[features]
|
|
default = ["parallel", "jxl", "avif"]
|
|
parallel = ["dep:rayon", "lightcraft-raster/parallel", "jpeg-decoder/rayon"]
|
|
jxl = ["dep:jxl-oxide"]
|
|
# HEIC/HEIF decode via the optional lightcraft-heif crate (heic-rs, pure Rust). Off by default so
|
|
# distributors choose it at build time (HEVC patents are a distributor's call, same policy as
|
|
# PhotoCraft); official builds and CI enable it (`--features heif` on the apps).
|
|
heif = ["dep:lightcraft-heif"]
|
|
## AVIF encoding via ravif/rav1e (pure Rust, BSD). Native targets only; a no-op on wasm32.
|
|
avif = ["dep:ravif"]
|
|
|
|
[dev-dependencies]
|
|
proptest = { workspace = true }
|