I was wondering today how to write a G’MIC script to do this simple stuff : Considering a list of named images (obtained for instance with sp tiger,cat,dog,bottles
), how to duplicate a copy of these images at the end of the list while keeping exactly the same names?.
There are several ways to do it, but I was looking for the shorter code that does it.
Here is a solution:
foo :
sp tiger,cat,dog,bottles
[^] repeat $!/2 { =>[{$!/2+$>}] {$>,n} } # Duplicate + remove the copymark
Any better idea?
Hint: There is actually one better way to do this, with a command I’ve just introduced this morning