1 | [package] |
2 | name = "image" |
3 | version = "0.24.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.63.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 | [package.metadata.docs.rs] |
22 | all-features = true |
23 | rustdoc-args = ["--cfg" , "docsrs" ] |
24 | |
25 | include = [ |
26 | "/LICENSE-APACHE" , |
27 | "/LICENSE-MIT" , |
28 | "/README.md" , |
29 | "/CHANGES.md" , |
30 | "/src/" , |
31 | "/benches/" , |
32 | ] |
33 | |
34 | [dependencies] |
35 | bytemuck = { version = "1.8.0" , features = ["extern_crate_alloc" ] } # includes cast_vec |
36 | byteorder = "1.3.2" |
37 | num-traits = "0.2.0" |
38 | gif = { version = "0.13" , optional = true } |
39 | jpeg = { package = "jpeg-decoder" , version = "0.3.0" , default-features = false, optional = true } |
40 | png = { version = "0.17.6" , optional = true } |
41 | tiff = { version = "0.9.0" , optional = true } |
42 | ravif = { version = "0.11.0" , optional = true } |
43 | rgb = { version = "0.8.25" , optional = true } |
44 | mp4parse = { version = "0.17.0" , optional = true } |
45 | dav1d = { version = "0.10.2" , optional = true } |
46 | dcv-color-primitives = { version = "0.6.1" , optional = true } |
47 | color_quant = "1.1" |
48 | exr = { version = "1.5.0" , optional = true } |
49 | qoi = { version = "0.4" , optional = true } |
50 | libwebp = { package = "webp" , version = "0.2.2" , default-features = false, optional = true } |
51 | rayon = { version = "1.7.0" , optional = true } |
52 | |
53 | [dev-dependencies] |
54 | crc32fast = "1.2.0" |
55 | num-complex = "0.4" |
56 | glob = "0.3" |
57 | quickcheck = "1" |
58 | criterion = "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. |
61 | jpeg = { 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 |
65 | default = ["gif" , "jpeg" , "ico" , "png" , "pnm" , "tga" , "tiff" , "webp" , "bmp" , "hdr" , "dxt" , "dds" , "farbfeld" , "jpeg_rayon" , "openexr" , "qoi" ] |
66 | |
67 | ico = ["bmp" , "png" ] |
68 | pnm = [] |
69 | tga = [] |
70 | bmp = [] |
71 | hdr = [] |
72 | dxt = [] |
73 | dds = ["dxt" ] |
74 | farbfeld = [] |
75 | openexr = ["exr" ] |
76 | qoi = ["dep:qoi" ] |
77 | |
78 | # Enables WebP decoder support. |
79 | webp = [] |
80 | # Non-default, not included in `webp`. Requires native dependency libwebp. |
81 | webp-encoder = ["libwebp" , "webp" ] |
82 | |
83 | # Enables multi-threading. |
84 | # Requires latest stable Rust. |
85 | jpeg_rayon = ["jpeg/rayon" ] |
86 | # Non-default, enables avif support. |
87 | # Requires latest stable Rust. |
88 | avif = ["avif-encoder" ] |
89 | # Requires latest stable Rust and recent nasm (>= 2.14). |
90 | avif-encoder = ["ravif" , "rgb" ] |
91 | # Non-default, even in `avif`. Requires stable Rust and native dependency libdav1d. |
92 | avif-decoder = ["mp4parse" , "dcv-color-primitives" , "dav1d" ] |
93 | |
94 | # Build some inline benchmarks. Useful only during development. |
95 | # Requires rustc nightly for feature test. |
96 | benchmarks = [] |
97 | |
98 | [[bench]] |
99 | path = "benches/decode.rs" |
100 | name = "decode" |
101 | harness = false |
102 | |
103 | [[bench]] |
104 | path = "benches/encode.rs" |
105 | name = "encode" |
106 | harness = false |
107 | |
108 | [[bench]] |
109 | name = "copy_from" |
110 | harness = false |
111 | |