From 463ee92e5218ebb20bf8e5cb07103863f1912b3e Mon Sep 17 00:00:00 2001 From: Daniel Wong Date: Tue, 21 Aug 2018 20:40:11 +1000 Subject: [PATCH] Force .png file extension when converting to/from alphablend (would just use source file extension) --- src/alphablend.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/alphablend.rs b/src/alphablend.rs index 840a023..ce879e1 100644 --- a/src/alphablend.rs +++ b/src/alphablend.rs @@ -73,7 +73,10 @@ pub fn convert_folder_to_alphablend(reverse : bool) -> u32 let output_path = Path::new("output_images").join(path_with_input_images_as_root); println!("output path: {}", output_path.to_str().unwrap()); - let save_path = output_path.to_str().unwrap(); + //force .png extension, then convert to string + let save_path_as_png = output_path.with_extension("png"); + let save_path = save_path_as_png.to_str().unwrap(); + //let file_name_no_ext = ent.path().file_stem().unwrap().to_str().unwrap(); //let save_path = [file_name_no_ext, ".png"].concat();