| 1 |
[package] |
| 2 |
name = "image" |
| 3 |
version = "0.25.9" |
| 4 |
edition = "2021" |
| 5 |
resolver = "2" |
| 6 |
|
| 7 |
# note: when changed, also update test runner in `.github/workflows/rust.yml` |
| 8 |
rust-version = "1.85.0" |
| 9 |
|
| 10 |
license = "MIT OR Apache-2.0" |
| 11 |
description = "Imaging library. Provides basic image processing and encoders/decoders for common image formats." |
| 12 |
authors = ["The image-rs Developers"] |
| 13 |
readme = "README.md" |
| 14 |
|
| 15 |
# crates.io metadata |
| 16 |
documentation = "https://docs.rs/image" |
| 17 |
repository = "https://github.com/image-rs/image" |
| 18 |
homepage = "https://github.com/image-rs/image" |
| 19 |
categories = ["multimedia::images", "multimedia::encoding", "encoding"] |
| 20 |
|
| 21 |
# Crate build related |
| 22 |
exclude = ["src/png/testdata/*", "examples/*", "tests/*"] |
| 23 |
|
| 24 |
include = [ |
| 25 |
"/LICENSE-APACHE", |
| 26 |
"/LICENSE-MIT", |
| 27 |
"/README.md", |
| 28 |
"/CHANGES.md", |
| 29 |
"/src/", |
| 30 |
"/benches/", |
| 31 |
] |
| 32 |
|
| 33 |
[package.metadata.docs.rs] |
| 34 |
all-features = true |
| 35 |
rustdoc-args = ["--cfg", "docsrs"] |
| 36 |
|
| 37 |
[dependencies] |
| 38 |
bytemuck = { version = "1.8.0", features = ["extern_crate_alloc"] } # includes cast_vec |
| 39 |
byteorder-lite = "0.1.0" |
| 40 |
moxcms = { version = "0.7.4" } |
| 41 |
num-traits = { version = "0.2.0" } |
| 42 |
|
| 43 |
# Optional dependencies |
| 44 |
color_quant = { version = "1.1", optional = true } |
| 45 |
dav1d = { version = "0.10.3", optional = true } |
| 46 |
exr = { version = "1.74.0", default-features = false, optional = true } |
| 47 |
gif = { version = "0.14.0", optional = true } |
| 48 |
image-webp = { version = "0.2.0", optional = true } |
| 49 |
mp4parse = { version = "0.17.0", optional = true } |
| 50 |
png = { version = "0.18.0", optional = true } |
| 51 |
qoi = { version = "0.4", optional = true } |
| 52 |
ravif = { version = "0.12", default-features = false, optional = true } |
| 53 |
rayon = { version = "1.7.0", optional = true } |
| 54 |
rgb = { version = "0.8.48", default-features = false, optional = true } |
| 55 |
tiff = { version = "0.10.3", optional = true } |
| 56 |
zune-core = { version = "0.5.0", default-features = false, optional = true } |
| 57 |
zune-jpeg = { version = "0.5.5", optional = true } |
| 58 |
serde = { version = "1.0.214", optional = true, features = ["derive"] } |
| 59 |
|
| 60 |
[dev-dependencies] |
| 61 |
crc32fast = "1.2.0" |
| 62 |
num-complex = "0.4" |
| 63 |
glob = "0.3" |
| 64 |
quickcheck = "1" |
| 65 |
criterion = "0.5.0" |
| 66 |
|
| 67 |
[features] |
| 68 |
default = ["rayon", "default-formats"] |
| 69 |
|
| 70 |
# Format features |
| 71 |
default-formats = ["avif", "bmp", "dds", "exr", "ff", "gif", "hdr", "ico", "jpeg", "png", "pnm", "qoi", "tga", "tiff", "webp"] |
| 72 |
avif = ["dep:ravif", "dep:rgb"] |
| 73 |
bmp = [] |
| 74 |
dds = [] |
| 75 |
exr = ["dep:exr"] |
| 76 |
ff = [] # Farbfeld image format |
| 77 |
gif = ["dep:gif", "dep:color_quant"] |
| 78 |
hdr = [] |
| 79 |
ico = ["bmp", "png"] |
| 80 |
jpeg = ["dep:zune-core", "dep:zune-jpeg"] |
| 81 |
png = ["dep:png"] |
| 82 |
pnm = [] |
| 83 |
qoi = ["dep:qoi"] |
| 84 |
tga = [] |
| 85 |
tiff = ["dep:tiff"] |
| 86 |
webp = ["dep:image-webp"] |
| 87 |
|
| 88 |
# Other features |
| 89 |
rayon = ["dep:rayon", "ravif?/threading", "exr?/rayon"] # Enables multi-threading |
| 90 |
nasm = ["ravif?/asm"] # Enables use of nasm by rav1e (requires nasm to be installed) |
| 91 |
color_quant = ["dep:color_quant"] # Enables color quantization |
| 92 |
avif-native = ["dep:mp4parse", "dep:dav1d"] # Enable native dependency libdav1d |
| 93 |
benchmarks = [] # Build some inline benchmarks. Useful only during development (requires nightly Rust) |
| 94 |
serde = ["dep:serde"] |
| 95 |
|
| 96 |
[[bench]] |
| 97 |
path = "benches/decode.rs" |
| 98 |
name = "decode" |
| 99 |
harness = false |
| 100 |
|
| 101 |
[[bench]] |
| 102 |
path = "benches/encode.rs" |
| 103 |
name = "encode" |
| 104 |
harness = false |
| 105 |
|
| 106 |
[[bench]] |
| 107 |
name = "copy_from" |
| 108 |
harness = false |
| 109 |
|
| 110 |
[[bench]] |
| 111 |
path = "benches/fast_blur.rs" |
| 112 |
name = "fast_blur" |
| 113 |
harness = false |
| 114 |
|
| 115 |
[[bench]] |
| 116 |
path = "benches/blur.rs" |
| 117 |
name = "blur" |
| 118 |
harness = false |
| 119 |
|
| 120 |
# because of https://github.com/image-rs/image/pull/2583 |
| 121 |
# TODO: remove when shipping the next major release after 0.25 |
| 122 |
[package.metadata.cargo-semver-checks.lints] |
| 123 |
enum_discriminants_undefined_non_unit_variant = { level = "warn" } |