From 6af9b21be1f7a4fd2c7ec8d43578bb2937bed508 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Sun, 31 Dec 2023 01:25:08 +0200 Subject: [PATCH] use 5 digits since we have a 5G file with 46372 frames --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 2e02c3a..7af1dc9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -249,12 +249,12 @@ fn decode(filename: &str) -> PyResult { pub fn decode_to_files(filename: &str, frames_root: &str) -> anyhow::Result<()> { let frameiter = Decoder::new(filename)?; for (i, frame) in frameiter.enumerate() { - let name = format!("{}/{:04}.png", frames_root, i); + let name = format!("{}/{:05}.png", frames_root, i); if let Err(_e) = write_raw_frame(&name, &frame.raw) { println!("skipping bad frame {}", i); continue; } - let name = format!("{}/temp_{:04}.png", frames_root, i); + let name = format!("{}/temp_{:05}.png", frames_root, i); let pixels = frame.pixels(); write_calibrated_frame(&name, &pixels)?; }