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