2 small comments
This commit is contained in:
parent
fc6d2c9033
commit
0809baf323
|
|
@ -1,5 +1,5 @@
|
|||
use std::process::exit;
|
||||
use image::{DynamicImage, GenericImageView, imageops, Rgba};
|
||||
use image::{DynamicImage, GenericImageView, Rgba};
|
||||
use log::error;
|
||||
use crate::model_rgb_ascii::Ascii;
|
||||
|
||||
|
|
@ -43,7 +43,7 @@ pub fn to_custom_ascii(char_map: String, image: DynamicImage) -> Vec<Vec<Ascii>>
|
|||
to_ascii(char_map, image)
|
||||
}
|
||||
|
||||
pub fn to_braille_ascii(mut image: DynamicImage, threshold: u8) -> Vec<Vec<Ascii>> {
|
||||
pub fn to_braille_ascii(image: DynamicImage, threshold: u8) -> Vec<Vec<Ascii>> {
|
||||
let mut str: Vec<Ascii> = Vec::new();
|
||||
let mut out: Vec<Vec<Ascii>> = Vec::new();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use termion::terminal_size;
|
||||
use log::{debug, error, trace};
|
||||
use log::{debug, error};
|
||||
use std::process::exit;
|
||||
use std::path::PathBuf;
|
||||
use image::DynamicImage;
|
||||
|
|
@ -19,6 +19,7 @@ fn get_terminal_size() -> (u32, u32) {
|
|||
}
|
||||
|
||||
pub fn resize_image(img: DynamicImage, full: bool, braille: bool, opt_w: Option<u32>) -> DynamicImage {
|
||||
//compiler complains that these v values are never read; this is true, however they are necessary because otherwise the program simply will not compile.
|
||||
let (mut w, mut h) = (1,1);
|
||||
let (max_w, max_h) = get_terminal_size();
|
||||
if full {
|
||||
|
|
|
|||
Loading…
Reference in New Issue