fix encoder
This commit is contained in:
parent
cabd109554
commit
da1f18b427
1 changed files with 24 additions and 21 deletions
|
@ -403,7 +403,9 @@ async fn main() {
|
||||||
.set_repeat(gif::Repeat::Finite(0))
|
.set_repeat(gif::Repeat::Finite(0))
|
||||||
.expect("encode: unable to set repeat");
|
.expect("encode: unable to set repeat");
|
||||||
println!("encode: encoding {n}...");
|
println!("encode: encoding {n}...");
|
||||||
for i in (n * (25 * 5) + 1)..=dir {
|
for i in (n * (25 * 5))..dir {
|
||||||
|
{
|
||||||
|
let i = i + 1;
|
||||||
let decoder = Decoder::new(
|
let decoder = Decoder::new(
|
||||||
File::open(format!("vid/{}.png", i))
|
File::open(format!("vid/{}.png", i))
|
||||||
.expect(format!("encode: unable to read vid/{}.png", i).as_str()),
|
.expect(format!("encode: unable to read vid/{}.png", i).as_str()),
|
||||||
|
@ -423,7 +425,8 @@ async fn main() {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.write_frame(&frame)
|
.write_frame(&frame)
|
||||||
.expect("encode: unable to encode frame to gif");
|
.expect("encode: unable to encode frame to gif");
|
||||||
if i / (25 * 5) != n + 1 {
|
}
|
||||||
|
if i / (25 * 5) != n {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue