From 407ee38e3a7712ea4e88143757bf0f26a84e4e16 Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Mon, 11 Mar 2024 08:59:47 +0000 Subject: [PATCH] Update features for image crate. --- Cargo.lock | 50 +++++++++++++++++++++++++++++++------------------- Cargo.toml | 2 +- 2 files changed, 32 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 08d1781..31592de 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -501,12 +501,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "color_quant" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" - [[package]] name = "constant_time_eq" version = "0.3.0" @@ -936,15 +930,27 @@ dependencies = [ [[package]] name = "image" -version = "0.24.9" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d" +checksum = "a9b4f005360d32e9325029b38ba47ebd7a56f3316df09249368939562d518645" dependencies = [ "bytemuck", "byteorder", - "color_quant", - "jpeg-decoder", + "image-webp", "num-traits", + "rayon", + "zune-core", + "zune-jpeg", +] + +[[package]] +name = "image-webp" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6107a25f04af48ceeb4093eebc9b405ee5a1813a0bab5ecf1805d3eabb3337" +dependencies = [ + "byteorder", + "thiserror", ] [[package]] @@ -1013,15 +1019,6 @@ dependencies = [ "libc", ] -[[package]] -name = "jpeg-decoder" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" -dependencies = [ - "rayon", -] - [[package]] name = "js-sys" version = "0.3.69" @@ -2704,3 +2701,18 @@ dependencies = [ "cc", "pkg-config", ] + +[[package]] +name = "zune-core" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" + +[[package]] +name = "zune-jpeg" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec866b44a2a1fd6133d363f073ca1b179f438f99e7e5bfb1e33f7181facfe448" +dependencies = [ + "zune-core", +] diff --git a/Cargo.toml b/Cargo.toml index ab3fabd..11f9902 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ qstring = "0.7.2" mimalloc = { version = "0.1.39", optional = true } # Transcoding Images to WebP/AVIF to save bandwidth -image = { version = "0.25.0", features = ["jpeg", "jpeg_rayon", "webp"], default-features = false, optional = true } +image = { version = "0.25.0", features = ["jpeg", "webp", "rayon"], default-features = false, optional = true } libwebp-sys = { version = "0.9.5", optional = true } ravif = { version = "0.11.4", optional = true } rgb = { version = "0.8.37", optional = true }