Skip to content

Commit

Permalink
Force .png file extension when converting to/from alphablend (would j…
Browse files Browse the repository at this point in the history
…ust use source file extension)
  • Loading branch information
drojf committed Aug 21, 2018
1 parent 4125f5e commit 463ee92
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/alphablend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 463ee92

Please sign in to comment.