From b5ab35e9db657a8e6fd1ce8778d8c78157535b53 Mon Sep 17 00:00:00 2001 From: Dmitry Stepanov Date: Sun, 16 Jun 2024 14:23:25 +0300 Subject: [PATCH] updated deps --- editor/Cargo.toml | 4 ++-- fyrox-core/Cargo.toml | 2 +- fyrox-impl/Cargo.toml | 8 +++---- fyrox-impl/src/resource/texture/mod.rs | 31 +++++++++++++++----------- fyrox-ui/Cargo.toml | 2 +- 5 files changed, 26 insertions(+), 21 deletions(-) diff --git a/editor/Cargo.toml b/editor/Cargo.toml index f8dab1b62..0de4dbc08 100644 --- a/editor/Cargo.toml +++ b/editor/Cargo.toml @@ -24,8 +24,8 @@ open = "5" rust-fuzzy-search = "0.1.1" cargo_metadata = "0.18.1" serde_json = "1.0.113" -image = { version = "0.24.8", default-features = false, features = ["gif", "jpeg", "png", "tga", "tiff", "bmp"] } -imageproc = "0.23.0" +image = { version = "0.25.1", default-features = false, features = ["gif", "jpeg", "png", "tga", "tiff", "bmp"] } +imageproc = "0.25.0" [features] default = ["fyrox/default"] diff --git a/fyrox-core/Cargo.toml b/fyrox-core/Cargo.toml index 68d12e24c..80e2615dd 100644 --- a/fyrox-core/Cargo.toml +++ b/fyrox-core/Cargo.toml @@ -17,7 +17,7 @@ rust-version = "1.72" [dependencies] fyrox-core-derive = { path = "../fyrox-core-derive", version = "0.23.0" } fyrox-math = { path = "../fyrox-math", version = "0.2.0" } -base64 = "0.21.0" +base64 = "0.22.1" byteorder = "1.4.3" rand = "0.8.4" memoffset = "0.9.0" diff --git a/fyrox-impl/Cargo.toml b/fyrox-impl/Cargo.toml index 3b62929ad..a73b019d2 100644 --- a/fyrox-impl/Cargo.toml +++ b/fyrox-impl/Cargo.toml @@ -24,7 +24,7 @@ fyrox-animation = { path = "../fyrox-animation", version = "0.2.0" } fyrox-graph = { path = "../fyrox-graph", version = "0.1.0" } rapier2d = { version = "0.20", features = ["debug-render"] } rapier3d = { version = "0.20", features = ["debug-render"] } -image = { version = "0.24.8", default-features = false, features = ["gif", "jpeg", "png", "tga", "tiff", "bmp"] } +image = { version = "0.25.1", default-features = false, features = ["gif", "jpeg", "png", "tga", "tiff", "bmp"] } inflate = "0.4.5" serde = { version = "1", features = ["derive"] } lazy_static = "1.4.0" @@ -41,8 +41,8 @@ strum_macros = "0.26.1" clap = { version = "4", features = ["derive"] } winit = { version = "0.29.2", features = ["serde"] } half = "2.2.1" -fast_image_resize = "3.0.4" -base64 = "0.21.0" +fast_image_resize = "4.0.0" +base64 = "0.22.1" uvgen = "0.1.0" lightmap = "0.1.1" libloading = "0.8.1" @@ -51,7 +51,7 @@ gltf = { version = "1.4.0", optional = true, default-features = false, features # These dependencies isn't actually used by the engine, but it is needed to prevent cargo from rebuilding # the engine lib on different packages. hashbrown = { version = "0.14.3", features = ["raw"] } -imageproc = "0.23.0" +imageproc = "0.25.0" [features] enable_profiler = ["fyrox-core/enable_profiler"] diff --git a/fyrox-impl/src/resource/texture/mod.rs b/fyrox-impl/src/resource/texture/mod.rs index 398023bc8..08e71d890 100644 --- a/fyrox-impl/src/resource/texture/mod.rs +++ b/fyrox-impl/src/resource/texture/mod.rs @@ -34,6 +34,7 @@ use crate::{ }; use ddsfile::{Caps2, D3DFormat}; use fast_image_resize as fr; +use fast_image_resize::ResizeOptions; use fxhash::FxHasher; use fyrox_core::num_traits::Bounded; use fyrox_core::sparse::AtomicIndex; @@ -49,7 +50,6 @@ use std::{ fmt::{Debug, Display, Formatter}, hash::{Hash, Hasher}, io::Cursor, - num::NonZeroU32, ops::{Deref, DerefMut, Shr}, path::Path, }; @@ -1439,9 +1439,9 @@ impl Texture { let src_pixel_type = convert_pixel_type_enum(src_pixel_kind); let mut level_width = width; let mut level_height = height; - let mut current_level = fr::Image::from_vec_u8( - NonZeroU32::new(level_width).unwrap(), - NonZeroU32::new(level_height).unwrap(), + let mut current_level = fr::images::Image::from_vec_u8( + level_width, + level_height, dyn_img.as_bytes().to_vec(), src_pixel_type, ) @@ -1449,18 +1449,23 @@ impl Texture { while level_width != 0 && level_height != 0 { if mip_count != 0 { - let mut dst_img = fr::Image::new( - NonZeroU32::new(level_width).unwrap(), - NonZeroU32::new(level_height).unwrap(), - src_pixel_type, - ); + let mut dst_img = + fr::images::Image::new(level_width, level_height, src_pixel_type); - let mut resizer = fr::Resizer::new(fr::ResizeAlg::Convolution( - import_options.mip_filter.into_filter_type(), - )); + let mut resizer = fr::Resizer::new(); resizer - .resize(¤t_level.view(), &mut dst_img.view_mut()) + .resize( + ¤t_level, + &mut dst_img, + Some(&ResizeOptions { + algorithm: fr::ResizeAlg::Convolution( + import_options.mip_filter.into_filter_type(), + ), + cropping: Default::default(), + mul_div_alpha: true, + }), + ) .expect("Pixel types must match!"); current_level = dst_img; diff --git a/fyrox-ui/Cargo.toml b/fyrox-ui/Cargo.toml index 56210be5f..859ba6d00 100644 --- a/fyrox-ui/Cargo.toml +++ b/fyrox-ui/Cargo.toml @@ -21,7 +21,7 @@ fyrox-graph = { path = "../fyrox-graph", version = "0.1.0" } fyrox-animation = { path = "../fyrox-animation", version = "0.2.0"} lazy_static = "1.4.0" copypasta = "0.10.1" -fontdue = "0.8.0" +fontdue = "0.9.2" notify = "6" fxhash = "0.2.1" strum = "0.26.1"