elsonwx/webp2gif

Fails at rename

Closed this issue · 3 comments

The script runs and finishes but no output and no errors!
And tried different files with same result

Here is a sample:

[user@localhost]$ ./webp2gif T01.webp t01.gif
Extracting webp frames...
Saved file 1.webp (5790 bytes)
Decoded 1.webp. Dimensions: 512 x 512 . Format: lossy. Now saving...
Saved file 1.png
Saved file 2.webp (5844 bytes)
Decoded 2.webp. Dimensions: 512 x 512 . Format: lossy. Now saving...
Saved file 2.png
Saved file 3.webp (5812 bytes)
Decoded 3.webp. Dimensions: 512 x 512 . Format: lossy. Now saving...
Saved file 3.png
Saved file 4.webp (5894 bytes)
Decoded 4.webp. Dimensions: 512 x 512 . Format: lossy. Now saving...
Saved file 4.png

[it keeps on ........etc]

Saved file 185.webp (3928 bytes)
Decoded 185.webp. Dimensions: 512 x 512 . Format: lossy. Now saving...
Saved file 185.png
Saved file 186.webp (3902 bytes)
Decoded 186.webp. Dimensions: 512 x 512 . Format: lossy. Now saving...
Saved file 186.png
[user@localhost]$ 

After debugging it stops at the rename step

rename 's/(\d+)/sprintf("%03d",$1)/e' *.png

It doesn't rename or complain and also stops the script at this step. I even added the verbose parameter -v but still not errors shown!

@fduraibi try remove Line 51

set -e

then run again

@fduraibi try remove Line 51

set -e

then run again

Now it doesn't quit, and will generate an output but seems like the frame order is wrong.

And the rename command still doesn't show errors even when I run it from the command line

I fixed the code by totally eliminating the rename and will send a PR

Resolved by #11