mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-30 18:27:00 +01:00
96 lines
4.2 KiB
TOML
96 lines
4.2 KiB
TOML
[package]
|
|
name = "craft-image-codecs"
|
|
description = "Bounded, depth- and metadata-preserving codecs for flat raster image formats"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version.workspace = true
|
|
repository.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[features]
|
|
corpus = []
|
|
# Every codec below is on by default; a build that never reads or writes a format can turn
|
|
# `default-features` off and list the ones it needs. A format left out is still detected, and
|
|
# reading or writing it returns `CodecError::Unsupported` naming the feature.
|
|
default = ["dds", "dicom", "dpx", "exr", "fits", "iff", "jp2", "jpegls", "jxl-encode", "pnm", "tga", "tiff", "webp", "xpm"]
|
|
dds = []
|
|
dicom = []
|
|
# DPX and Cineon.
|
|
dpx = []
|
|
# OpenEXR, including deep data, Cryptomatte and the streaming reader.
|
|
exr = ["dep:exr"]
|
|
fits = []
|
|
iff = []
|
|
jpegls = []
|
|
# Lossless JPEG XL export (zune-jpegxl). Decode is the separate `jxl` feature.
|
|
jxl-encode = ["dep:zune-jpegxl"]
|
|
pnm = []
|
|
tga = ["image/tga"]
|
|
tiff = ["image/tiff"]
|
|
webp = ["dep:image-webp"]
|
|
xpm = []
|
|
# Opt in to threaded AVIF encoding without enabling AVIF (or assembly) by itself.
|
|
threads = ["ravif?/threading", "rav1e?/threading"]
|
|
sgi = []
|
|
sunraster = []
|
|
avif = ["image/avif", "dep:ravif", "dep:rav1e", "dep:avif-serialize"]
|
|
heif = ["dep:craft-heif"]
|
|
# JPEG XL decode via craft-jxl (jxl-oxide, pure Rust). Without it JPEG XL files are still detected
|
|
# and opening one is a clear unsupported error; export needs no feature.
|
|
jxl = ["dep:craft-jxl"]
|
|
# AVIF decode: craft-video's clean-room pure-Rust AV1 decoder. Native targets only (on wasm32 a
|
|
# decoder panic aborts instead of becoming an error), so wasm32 builds leave AVIF unreadable.
|
|
avif-decode = ["dep:craft-video", "craft-video/av1-decode"]
|
|
# `Image::source_profile` and `Image::to_display_rgba8`: convert an image's colors from its ICC
|
|
# profile or CICP description into a display profile with craft-cms.
|
|
cms = ["dep:craft-cms"]
|
|
# JPEG 2000 decode via hayro-jpeg2000; default-on to preserve existing app support.
|
|
jp2 = ["dep:hayro-jpeg2000"]
|
|
|
|
[dependencies]
|
|
craft-dds = { workspace = true }
|
|
crc32fast = "1.5"
|
|
thiserror = { workspace = true }
|
|
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "gif", "bmp", "ico", "qoi", "hdr"] }
|
|
png = "0.18"
|
|
tiff = { version = "0.11", default-features = false, features = ["deflate", "fax", "jpeg", "lzw"] }
|
|
exr = { version = "1.73", default-features = false, optional = true }
|
|
half = "2"
|
|
serde_json = { workspace = true }
|
|
flate2 = { version = "1.1.10", default-features = false, features = ["zlib-rs", "runtime_detection"] }
|
|
image-webp = { version = "0.2", optional = true }
|
|
zune-jpeg = "0.5"
|
|
zune-core = "0.5"
|
|
jpeg-encoder = "0.7.1"
|
|
craft-jpeg = { workspace = true }
|
|
craft-metadata = { workspace = true }
|
|
craft-tiff = { workspace = true, features = ["plain-rgba16"] }
|
|
zune-jpegxl = { version = "=0.5.2", default-features = false, features = ["std"], optional = true }
|
|
craft-cms = { workspace = true, optional = true }
|
|
craft-heif = { workspace = true, optional = true }
|
|
craft-jxl = { workspace = true, optional = true, features = ["decode"] }
|
|
ravif = { version = "0.13", default-features = false, optional = true }
|
|
rav1e = { version = "0.8", default-features = false, optional = true }
|
|
avif-serialize = { version = "0.8", optional = true }
|
|
hayro-jpeg2000 = { version = "=0.3.5", default-features = false, features = ["std", "simd"], optional = true }
|
|
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
|
# DDS encodes rows of blocks on several threads, as the other parallel codecs here do on native targets.
|
|
craft-dds = { workspace = true, features = ["parallel"] }
|
|
rayon = { workspace = true }
|
|
craft-video = { workspace = true, optional = true }
|
|
exr = { version = "1.73", default-features = false, features = ["rayon"], optional = true }
|
|
|
|
[dev-dependencies]
|
|
proptest = { workspace = true }
|
|
image = { version = "0.25", default-features = false, features = ["png", "jpeg"] }
|
|
sha2 = { version = "0.10", default-features = false, features = ["std"] }
|
|
craft-media-testkit = { workspace = true }
|
|
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
|
|
craft-video = { workspace = true, features = ["av1-decode"] }
|
|
jxl-oxide = { version = "=0.12.6", default-features = false, features = ["rayon"] }
|