Skip to content

Commit

Permalink
corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
3l-gee committed Mar 27, 2024
1 parent 43ba8a4 commit 9c0cd20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ impl ImageStruct {

pub fn save(&self) -> Result<(), String> {
let output_name = self.name.clone();
output_name.splitn(2, ".").next().unwrap_or("");
output_name.split('.');
let output_path = Path::new("../../output").join(output_name).with_extension("png");
println!("Image saved at {}", output_path.display());
match &self.img_processed {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/image_bucket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl ImageBucketStruct {

pub fn add_load_images(&mut self, path: &Path, image_name_list: Vec<String>){
for image_name in image_name_list {
let image_name_cleaned = image_name.replace("\\", "/"); // Replace backslashes with forward slashes
let image_name_cleaned = image_name.replace('\\', "/"); // Replace backslashes with forward slashes
let full_path = path.join(&image_name_cleaned);
match ImageStruct::load(full_path.to_str().expect("Invalid path")) {
Ok(image) => {
Expand Down

0 comments on commit 9c0cd20

Please sign in to comment.