1[package]
2name = "image"
3version = "0.25.6"
4edition = "2021"
5resolver = "2"
6
7# note: when changed, also update test runner in `.github/workflows/rust.yml`
8rust-version = "1.70.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# Crate build related
22exclude = ["src/png/testdata/*", "examples/*", "tests/*"]
23
24include = [
25 "/LICENSE-APACHE",
26 "/LICENSE-MIT",
27 "/README.md",
28 "/CHANGES.md",
29 "/src/",
30 "/benches/",
31]
32
33[package.metadata.docs.rs]
34all-features = true
35rustdoc-args = ["--cfg", "docsrs"]
36
37[dependencies]
38bytemuck = { version = "1.8.0", features = ["extern_crate_alloc"] } # includes cast_vec
39byteorder-lite = "0.1.0"
40num-traits = { version = "0.2.0" }
41
42# Optional dependencies
43color_quant = { version = "1.1", optional = true }
44dav1d = { version = "0.10.3", optional = true }
45exr = { version = "1.5.0", optional = true }
46gif = { version = "0.13.1", optional = true }
47image-webp = { version = "0.2.0", optional = true }
48mp4parse = { version = "0.17.0", optional = true }
49png = { version = "0.17.11", optional = true }
50qoi = { version = "0.4", optional = true }
51ravif = { version = "0.11.11", default-features = false, optional = true }
52rayon = { version = "1.7.0", optional = true }
53rgb = { version = "0.8.48", default-features = false, optional = true }
54tiff = { version = "0.9.0", optional = true }
55zune-core = { version = "0.4.12", default-features = false, optional = true }
56zune-jpeg = { version = "0.4.13", optional = true }
57serde = { version = "1.0.214", optional = true, features = ["derive"] }
58
59[dev-dependencies]
60crc32fast = "1.2.0"
61num-complex = "0.4"
62glob = "0.3"
63quickcheck = "1"
64criterion = "0.5.0"
65
66[features]
67default = ["rayon", "default-formats"]
68
69# Format features
70default-formats = ["avif", "bmp", "dds", "exr", "ff", "gif", "hdr", "ico", "jpeg", "png", "pnm", "qoi", "tga", "tiff", "webp"]
71avif = ["dep:ravif", "dep:rgb"]
72bmp = []
73dds = []
74exr = ["dep:exr"]
75ff = [] # Farbfeld image format
76gif = ["dep:gif", "dep:color_quant"]
77hdr = []
78ico = ["bmp", "png"]
79jpeg = ["dep:zune-core", "dep:zune-jpeg"]
80png = ["dep:png"]
81pnm = []
82qoi = ["dep:qoi"]
83tga = []
84tiff = ["dep:tiff"]
85webp = ["dep:image-webp"]
86
87# Other features
88rayon = ["dep:rayon", "ravif?/threading"] # Enables multi-threading
89nasm = ["ravif?/asm"] # Enables use of nasm by rav1e (requires nasm to be installed)
90color_quant = ["dep:color_quant"] # Enables color quantization
91avif-native = ["dep:mp4parse", "dep:dav1d"] # Enable native dependency libdav1d
92benchmarks = [] # Build some inline benchmarks. Useful only during development (requires nightly Rust)
93serde = ["dep:serde"]
94
95[[bench]]
96path = "benches/decode.rs"
97name = "decode"
98harness = false
99
100[[bench]]
101path = "benches/encode.rs"
102name = "encode"
103harness = false
104
105[[bench]]
106name = "copy_from"
107harness = false
108
109[[bench]]
110path = "benches/fast_blur.rs"
111name = "fast_blur"
112harness = false
113
114[[bench]]
115path = "benches/blur.rs"
116name = "blur"
117harness = false
118