summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-11-21 11:39:50 -0500
committerTavian Barnes <tavianator@tavianator.com>2023-11-21 11:39:50 -0500
commit22f45531e07dfd3f2b7b1639ef2d1860973c51ae (patch)
treebedf7cbe50ea4930f9df5fd14fbb99621b9a99c9 /src
parentea4f7c6b150079c697cab76d1a95c6f6e04ca5c8 (diff)
downloadkd-forest-22f45531e07dfd3f2b7b1639ef2d1860973c51ae.tar.xz
Bump image to 0.24.7
Diffstat (limited to 'src')
-rw-r--r--src/main.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index 09e335a..e9df476 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -13,8 +13,8 @@ use crate::frontier::Frontier;
use clap::{self, clap_app, crate_authors, crate_name, crate_version};
-use image::{self, ColorType, ImageError, Rgba, RgbaImage};
-use image::png::{CompressionType, FilterType, PngEncoder};
+use image::{self, ColorType, ImageEncoder, ImageError, Rgba, RgbaImage};
+use image::codecs::png::{CompressionType, FilterType, PngEncoder};
use rand::{self, SeedableRng};
use rand_pcg::Pcg64;
@@ -395,8 +395,8 @@ impl App {
}
let writer = BufWriter::new(stdout.lock());
- let encoder = PngEncoder::new_with_quality(writer, CompressionType::Rle, FilterType::NoFilter);
- encoder.encode(image, image.width(), image.height(), ColorType::Rgba8)?;
+ let encoder = PngEncoder::new_with_quality(writer, CompressionType::Fast, FilterType::NoFilter);
+ encoder.write_image(image, image.width(), image.height(), ColorType::Rgba8)?;
Ok(())
}