Confirm what @afre observes. If I zero-pad to a consistent-length: f0000.png, f0001.png, f0002.png,…f9999.png, my animation frames are correctly ordered and processed in order. In contrast, f0.png, f1.png,…f37.png,…f527.png,…,f9999.png are not processed in order. f10.png is processed before f2.png, for example, as in string, not numeric sorting.
That mainly because *.png create a list of filenames sorted lexically, so file20.png is just after file2.png, with this order.
It’s usually better to deal with fixed-size numbers, left-padded with 0 if necessary
(for G’MIC, but also many other command-line tools).