jpg buffer

This commit is contained in:
peppidesu 2024-10-19 15:08:05 +02:00
parent b3e25cd706
commit 4bcab8ad67
No known key found for this signature in database
GPG key ID: 4E9BA776E329260F
4 changed files with 42 additions and 22 deletions

View file

@ -12,7 +12,7 @@ use debug_print::{debug_eprintln, debug_println};
use flurry::{
config::{GRID_LENGTH, HOST, IMAGE_SAVE_INTERVAL},
flutclient::FlutClient,
grid::{self, Flut},
grid::{self, FlutGrid},
COUNTER,
};
use image::{codecs::jpeg::JpegEncoder, GenericImageView, SubImage};
@ -84,8 +84,8 @@ async fn handle_flut(flut_listener: TcpListener, grids: Arc<[grid::Flut<u32>]>)
#[tokio::main]
#[allow(clippy::needless_return)]
async fn main() {
let grids: Arc<[FlutGrid<u32>; GRID_LENGTH]> = [grid::FlutGrid::init(800, 600, 0xff_00_ff_ff)].into();
println!("created grids");
let grids: Arc<[Flut<u32>; GRID_LENGTH]> = [grid::Flut::init(800, 600, 0xff_00_ff_ff)].into();
let Ok(flut_listener) = TcpListener::bind(HOST).await else {
eprintln!("Was unable to bind to {HOST}, please check if a different process is bound");