Fix some small issues in apng2webp
This commit is contained in:
parent
cf58548429
commit
43809f8332
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env zsh
|
||||
# Convert animated PNG to animated WebP. Maximum compression no blend.
|
||||
# Convert animated PNG to animated WebP. Maximum lossless compression no blend.
|
||||
|
||||
setopt LOCAL_OPTIONS ERR_RETURN NO_UNSET PIPE_FAIL
|
||||
|
||||
@ -33,14 +33,14 @@ for file in apngdis/apngframe*.png; do
|
||||
done
|
||||
|
||||
local -a webpmux_options=()
|
||||
local counter=1
|
||||
local -i counter=1
|
||||
for file in apngdis/apngframe*.txt; do
|
||||
local delay=$(grep -Po '=\d+/' "${file}")
|
||||
delay=${delay:1:-1}
|
||||
[[ ${#o_delay} -eq 2 ]] && delay=${o_delay[2]}
|
||||
|
||||
webpmux_options+=(-frame $(printf "%02d" ${counter}).webp +${delay}+0+0+0-b)
|
||||
counter=$((counter+1))
|
||||
webpmux_options+=(-frame $(printf "%02d.webp" ${counter}) +${delay}+0+0+0-b)
|
||||
counter+=1
|
||||
done
|
||||
|
||||
# shellcheck disable=2086
|
||||
|
Loading…
x
Reference in New Issue
Block a user