1[package]
2name = "image"
3version = "0.24.9"
4edition = "2021"
5resolver = "2"
6
7# note: when changed, also update test runner in `.github/workflows/rust.yml`
8rust-version = "1.63.0"
9
10license = "MIT OR Apache-2.0"
11description = "Imaging library. Provides basic image processing and encoders/decoders for common image formats."
12authors = ["The image-rs Developers"]
13readme = "README.md"
14
15# crates.io metadata
16documentation = "https://docs.rs/image"
17repository = "https://github.com/image-rs/image"
18homepage = "https://github.com/image-rs/image"
19categories = ["multimedia::images", "multimedia::encoding", "encoding"]
20
21[package.metadata.docs.rs]
22all-features = true
23rustdoc-args = ["--cfg", "docsrs"]
24
25include = [
26 "/LICENSE-APACHE",
27 "/LICENSE-MIT",
28 "/README.md",
29 "/CHANGES.md",
30 "/src/",
31 "/benches/",
32]
33
34[dependencies]
35bytemuck = { version = "1.8.0", features = ["extern_crate_alloc"] } # includes cast_vec
36byteorder = "1.3.2"
37num-traits = "0.2.0"
38gif = { version = "0.13", optional = true }
39jpeg = { package = "jpeg-decoder", version = "0.3.0", default-features = false, optional = true }
40png = { version = "0.17.6", optional = true }
41tiff = { version = "0.9.0", optional = true }
42ravif = { version = "0.11.0", optional = true }
43rgb = { version = "0.8.25", optional = true }
44mp4parse = { version = "0.17.0", optional = true }
45dav1d = { version = "0.10.2", optional = true }
46dcv-color-primitives = { version = "0.6.1", optional = true }
47color_quant = "1.1"
48exr = { version = "1.5.0", optional = true }
49qoi = { version = "0.4", optional = true }
50libwebp = { package = "webp", version = "0.2.2", default-features = false, optional = true }
51rayon = { version = "1.7.0", optional = true }
52
53[dev-dependencies]
54crc32fast = "1.2.0"
55num-complex = "0.4"
56glob = "0.3"
57quickcheck = "1"
58criterion = "0.5.0"
59# Keep this in sync with the jpeg dependency above. This is used to enable the platform_independent
60# feature when testing, so `cargo test` works correctly.
61jpeg = { package = "jpeg-decoder", version = "0.3.0", default-features = false, features = ["platform_independent"] }
62
63[features]
64# TODO: Add "avif" to this list while preparing for 0.24.0
65default = ["gif", "jpeg", "ico", "png", "pnm", "tga", "tiff", "webp", "bmp", "hdr", "dxt", "dds", "farbfeld", "jpeg_rayon", "openexr", "qoi"]
66
67ico = ["bmp", "png"]
68pnm = []
69tga = []
70bmp = []
71hdr = []
72dxt = []
73dds = ["dxt"]
74farbfeld = []
75openexr = ["exr"]
76qoi = ["dep:qoi"]
77
78# Enables WebP decoder support.
79webp = []
80# Non-default, not included in `webp`. Requires native dependency libwebp.
81webp-encoder = ["libwebp", "webp"]
82
83# Enables multi-threading.
84# Requires latest stable Rust.
85jpeg_rayon = ["jpeg/rayon"]
86# Non-default, enables avif support.
87# Requires latest stable Rust.
88avif = ["avif-encoder"]
89# Requires latest stable Rust and recent nasm (>= 2.14).
90avif-encoder = ["ravif", "rgb"]
91# Non-default, even in `avif`. Requires stable Rust and native dependency libdav1d.
92avif-decoder = ["mp4parse", "dcv-color-primitives", "dav1d"]
93
94# Build some inline benchmarks. Useful only during development.
95# Requires rustc nightly for feature test.
96benchmarks = []
97
98[[bench]]
99path = "benches/decode.rs"
100name = "decode"
101harness = false
102
103[[bench]]
104path = "benches/encode.rs"
105name = "encode"
106harness = false
107
108[[bench]]
109name = "copy_from"
110harness = false
111