apng2webp: fix delay

apngdis stores the delay as fraction and i used it as if it were in
miliseconds.
This commit is contained in:
tastytea 2023-04-23 20:30:53 +02:00
parent 589c51e5b1
commit 775b081bd6
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM

View File

@ -40,8 +40,9 @@ done
local -a webpmux_options=()
local -i counter=1
for file in apngdis/apngframe*.txt; do
local delay=$(grep -Po '=\d+/' ${file})
delay=${delay:1:-1}
local delay=$(grep -Po '=\d+/\d+' ${file})
delay=${delay:1}
delay=$(( ( 1000 + ${delay%/*} ) / ${delay#*/} ))
[[ ${#o_delay} -eq 2 ]] && delay=${o_delay[2]}
webpmux_options+=(-frame $(printf "%03d.webp" ${counter}) +${delay}+0+0+0-b)