Skip to content

Commit

Permalink
chore: Bump image to v0.25, without the dxt feature
Browse files Browse the repository at this point in the history
  • Loading branch information
torokati44 committed Mar 18, 2024
1 parent 28048e9 commit ab91928
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 26 deletions.
25 changes: 18 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ png = { version = "0.17.13", optional = true }
flv-rs = { path = "../flv" }
async-channel = "2.2.0"
jpegxr = { git = "https://github.com/ruffle-rs/jpegxr", branch = "ruffle", optional = true }
image = { version = "0.24.9", default-features = false, features = ["tiff", "dxt"] }
image = { version = "0.25.0", default-features = false, features = ["tiff"] }
enum-map = "2.7.3"
ttf-parser = "0.20"
num-bigint = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion desktop/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cpal = "0.15.3"
egui = { workspace = true }
egui_extras = { version = "0.26.2", features = ["image"] }
egui-wgpu = { version = "0.26.2", features = ["winit"] }
image = { version = "0.24", default-features = false, features = ["png"] }
image = { version = "0.25.0", default-features = false, features = ["png"] }
egui-winit = "0.26.2"
fontdb = "0.16"
ruffle_core = { path = "../core", features = ["audio", "clap", "mp3", "nellymoser", "default_compatibility_rules", "egui"] }
Expand Down
2 changes: 1 addition & 1 deletion exporter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ clap = { workspace = true }
futures = "0.3"
ruffle_core = { path = "../core", features = ["deterministic", "default_font"] }
ruffle_render_wgpu = { path = "../render/wgpu", features = ["clap"] }
image = { version = "0.24.9", default-features = false, features = ["png"] }
image = { version = "0.25.0", default-features = false, features = ["png"] }
log = "0.4"
walkdir = "2.5.0"
indicatif = "0.17"
Expand Down
5 changes: 1 addition & 4 deletions exporter/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,7 @@ fn capture_single_swf(descriptors: Arc<Descriptors>, opt: &Opt) -> Result<()> {
if opt.output_path == Some(PathBuf::from("-")) {
let mut bytes: Vec<u8> = Vec::new();
image
.write_to(
&mut io::Cursor::new(&mut bytes),
image::ImageOutputFormat::Png,
)
.write_to(&mut io::Cursor::new(&mut bytes), image::ImageFormat::Png)
.expect("Encoding failed");
io::stdout()
.write_all(bytes.as_slice())
Expand Down
2 changes: 1 addition & 1 deletion render/wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ clap = { version = "4.5.3", features = ["derive"], optional = true }
enum-map = "2.7.3"
fnv = "1.0.7"
swf = { path = "../../swf" }
image = { version = "0.24.9", default-features = false }
image = { version = "0.25.0", default-features = false }
naga_oil = { workspace = true }
naga-agal = { path = "../naga-agal" }
naga-pixelbender = { path = "../naga-pixelbender" }
Expand Down
2 changes: 1 addition & 1 deletion tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ruffle_test_framework = { path = "framework" }
libtest-mimic = "0.7.0"
walkdir = "2.5.0"
anyhow = "1.0.81"
image = { version = "0.24.9", default-features = false, features = ["png"] }
image = { version = "0.25.0", default-features = false, features = ["png"] }
futures = "0.3.30"
env_logger = "0.11.3"
tracing = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion tests/framework/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ruffle_render = { path = "../../render" }
ruffle_input_format = { path = "../input-format" }
ruffle_socket_format = { path = "../socket-format" }
ruffle_video_software = { path = "../../video/software", optional = true }
image = { version = "0.24.9", default-features = false, features = ["png"] }
image = { version = "0.25.0", default-features = false, features = ["png"] }
regex = "1.10.3"
url = "2.5.0"
chrono = "0.4.35"
Expand Down
8 changes: 4 additions & 4 deletions tests/framework/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::image_trigger::ImageTrigger;
use crate::util::write_image;
use anyhow::{anyhow, Result};
use approx::relative_eq;
use image::ImageOutputFormat;
use image::ImageFormat;
use regex::Regex;
use ruffle_core::tag_utils::SwfMovie;
use ruffle_core::{PlayerBuilder, PlayerRuntime, ViewportDimensions};
Expand Down Expand Up @@ -246,7 +246,7 @@ impl ImageComparison {
write_image(
&test_path.join(format!("{name}.actual-{environment_name}.png"))?,
&actual_image,
ImageOutputFormat::Png,
ImageFormat::Png,
)
} else {
Ok(())
Expand Down Expand Up @@ -324,7 +324,7 @@ impl ImageComparison {
write_image(
&test_path.join(format!("{name}.difference-color-{environment_name}.png"))?,
&difference_image,
ImageOutputFormat::Png,
ImageFormat::Png,
)?;
}

Expand All @@ -348,7 +348,7 @@ impl ImageComparison {
&test_path
.join(format!("{name}.difference-alpha-{environment_name}.png"))?,
&difference_image,
ImageOutputFormat::Png,
ImageFormat::Png,
)?;
}
}
Expand Down
6 changes: 3 additions & 3 deletions tests/framework/src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::options::{ImageComparison, TestOptions};
use crate::test::Test;
use crate::util::{read_bytes, write_image};
use anyhow::{anyhow, Result};
use image::ImageOutputFormat;
use image::ImageFormat;
use pretty_assertions::Comparison;
use ruffle_core::backend::navigator::NullExecutor;
use ruffle_core::events::MouseButton as RuffleMouseButton;
Expand Down Expand Up @@ -169,7 +169,7 @@ impl TestRunner {
self.executor.run();
}

/// After a tick, run any custom fdcommands that were queued up and perform any scheduled tests.
/// After a tick, run any custom fdcommands that were queued up and perform any scheduled tests.
pub fn test(&mut self) -> Result<TestStatus> {
for command in self.fs_commands.try_iter() {
match command {
Expand Down Expand Up @@ -455,7 +455,7 @@ fn capture_and_compare_image(
));
} else {
// If we're expecting this to be wrong, don't save a likely wrong image
write_image(&expected_image_path, &actual_image, ImageOutputFormat::Png)?;
write_image(&expected_image_path, &actual_image, ImageFormat::Png)?;
}
} else if known_failure {
// It's possible that the trace output matched but the image might not.
Expand Down
4 changes: 2 additions & 2 deletions tests/framework/src/util.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use image::{EncodableLayout, ImageBuffer, ImageOutputFormat, Pixel, PixelWithColorType};
use image::{EncodableLayout, ImageBuffer, ImageFormat, Pixel, PixelWithColorType};
use std::io::{Cursor, Read, Write};
use std::ops::Deref;
use vfs::{VfsError, VfsPath};
Expand All @@ -17,7 +17,7 @@ pub fn write_bytes(path: &VfsPath, data: &[u8]) -> Result<(), VfsError> {
pub fn write_image<P, Container>(
path: &VfsPath,
image: &ImageBuffer<P, Container>,
format: ImageOutputFormat,
format: ImageFormat,
) -> anyhow::Result<()>
where
P: Pixel + PixelWithColorType,
Expand Down

0 comments on commit ab91928

Please sign in to comment.