ft: 2.3: debug log
This commit is contained in:
1 parent
6787bb5cfd
commit
1c7460d2f5
2 files changed
+7
No files matched your search
@@ -1,10 +1,16 @@
|
||||
use log::info;
|
||||
use pretty_env_logger;
|
||||
|
||||
fn main() {
|
||||
pretty_env_logger::init();
|
||||
|
||||
let image_width = 256;
|
||||
let image_height = 256;
|
||||
|
||||
let mut imgbuf = image::ImageBuffer::new(image_width, image_height);
|
||||
|
||||
for j in 0..image_height {
|
||||
info!("{}\tScanlines remaining.", (image_height - j));
|
||||
for i in 0..image_width {
|
||||
let r = i as f32 / (image_width - 1) as f32;
|
||||
let g = j as f32 / (image_height - 1) as f32;
|
||||
@@ -19,5 +25,6 @@ fn main() {
|
||||
}
|
||||
}
|
||||
|
||||
info!("Writing image file...");
|
||||
imgbuf.save("output.png").unwrap();
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 KiB |