fix formatting
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
|
use rayon::prelude::*;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::thread::sleep;
|
use std::thread::sleep;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use rayon::prelude::*;
|
|
||||||
|
|
||||||
use image;
|
use image;
|
||||||
use image::DynamicImage;
|
|
||||||
use image::imageops::FilterType;
|
use image::imageops::FilterType;
|
||||||
|
use image::DynamicImage;
|
||||||
|
|
||||||
use pix::canvas::Canvas;
|
use pix::canvas::Canvas;
|
||||||
|
|
||||||
@@ -33,8 +33,12 @@ impl ImageManager {
|
|||||||
println!("Load and process {} image(s)...", paths.len());
|
println!("Load and process {} image(s)...", paths.len());
|
||||||
|
|
||||||
// Load the images from the paths
|
// Load the images from the paths
|
||||||
let image_manager =
|
let image_manager = ImageManager::from(
|
||||||
ImageManager::from(paths.par_iter().map(|path| load_image(path, size)).collect());
|
paths
|
||||||
|
.par_iter()
|
||||||
|
.map(|path| load_image(path, size))
|
||||||
|
.collect(),
|
||||||
|
);
|
||||||
|
|
||||||
// TODO: process the image slices
|
// TODO: process the image slices
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ impl Painter {
|
|||||||
// Define the color
|
// Define the color
|
||||||
let color = Color::from(channels[0], channels[1], channels[2], channels[3]);
|
let color = Color::from(channels[0], channels[1], channels[2], channels[3]);
|
||||||
|
|
||||||
|
|
||||||
// Set the pixel
|
// Set the pixel
|
||||||
if let Some(client) = &mut self.client {
|
if let Some(client) = &mut self.client {
|
||||||
client.write_pixel(
|
client.write_pixel(
|
||||||
|
|||||||
Reference in New Issue
Block a user