use 5 digits since we have a 5G file with 46372 frames
This commit is contained in:
parent
5f5834835c
commit
6af9b21be1
|
@ -249,12 +249,12 @@ fn decode(filename: &str) -> PyResult<PyFrameIterator> {
|
||||||
pub fn decode_to_files(filename: &str, frames_root: &str) -> anyhow::Result<()> {
|
pub fn decode_to_files(filename: &str, frames_root: &str) -> anyhow::Result<()> {
|
||||||
let frameiter = Decoder::new(filename)?;
|
let frameiter = Decoder::new(filename)?;
|
||||||
for (i, frame) in frameiter.enumerate() {
|
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) {
|
if let Err(_e) = write_raw_frame(&name, &frame.raw) {
|
||||||
println!("skipping bad frame {}", i);
|
println!("skipping bad frame {}", i);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let name = format!("{}/temp_{:04}.png", frames_root, i);
|
let name = format!("{}/temp_{:05}.png", frames_root, i);
|
||||||
let pixels = frame.pixels();
|
let pixels = frame.pixels();
|
||||||
write_calibrated_frame(&name, &pixels)?;
|
write_calibrated_frame(&name, &pixels)?;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user