1
0
Fork 0

Utils: Update conversion command

For some gifs, my original convert command mangled the deltas and produced
completly wrong frames.
This is due to a couple of mistakes in the order of operations
1. The -coalesce option to flatten all layers up to the current frame
   needs to be before the output, not the input
2. Resizing was done *before* the coalesce option, leading to invalid
   delta frames and image corruption
3. This was emphasized by the thresholding, making it look mangled.

Update the command in the script and the example in the README.
This commit is contained in:
trotFunky 2024-03-18 13:15:41 +00:00
parent 2a023425a5
commit b59de6b690
2 changed files with 2 additions and 2 deletions

View file

@ -158,7 +158,7 @@ ses images individuelles, et les convertir en un format de bitmap presque correc
(aux bits inversés) avec la commande suivante :
```shell
convert -resize 84x48 -coalesce <animation>.gif -threshold 50% %02d.mono
convert <animation>.gif -coalesce -resize 84x48 -threshold 50% %02d.mono
```
Il peut être nécessaire d'inverser les bits comme mentionné plus haut et je n'ai

View file

@ -40,7 +40,7 @@ for gifToConvert in "$@"; do
mkdir "$animDir"
pushd "$animDir"
convert -resize 84x48 -coalesce ../"$gifToConvert" -threshold 50% %02d.mono
convert ../"$gifToConvert" -coalesce -resize 84x48 -threshold 50% %02d.mono
"$bmp_help" ./*.mono
# Clean up and remove the extension
rm -f ./*.mono