imageLoader branch created

imageLoader file created
imageLoader function created (placeholder)
included imageLoader into lib.rs
added a new folder with 2 test img
This commit is contained in:
Schwingel0206 2023-06-08 19:11:40 +02:00
parent 57016c1083
commit f05ede7a81
4 changed files with 20 additions and 0 deletions

19
src/image_loader/mod.rs Normal file
View File

@ -0,0 +1,19 @@
use std::path::Path;
use crate::image::Image;
pub fn image_loader(path: &Path) -> Image<f32> {
let vec: Vec<(f32, f32, f32, f32)> = vec![
(-33.0, 7732.0, 2564355.0, -79.0),
(1.0, 79.0, 255.0, 1.05),
(300.0, 300.0, 300.0, 300.0),
];
let image: Image<f32> = Image::new(1, 3, vec);
image
}
//höhe(in px[usize: u8])
//breite(in px[usize: u8])
//tupel pro pixel mit (f32, f32, f32, f32) alle pixel in einen vector und der verctor in den image struct !!!ALLES IN 0-255 PIXEL!!!
//absoluter pfad

View File

@ -1,6 +1,7 @@
extern crate core;
pub mod image;
pub mod image_loader;
pub mod multithreading;
pub fn add(left: usize, right: usize) -> usize {

BIN
test_img/hut.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

BIN
test_img/town_blue.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB