1
0
Fork 0

Fix some small issues in apng2webp

This commit is contained in:
tastytea 2022-05-04 15:45:53 +02:00
parent cf58548429
commit 43809f8332
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 4 additions and 4 deletions

View File

@ -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