From an image made up of 9 smaller images arranged as a 3x3-grid like
AAA
BBB
CCC
i want to automatically generate all possible variations as .pngs, where the position of the smaller images does matter, no position can be empty and and each small image must be present three times. I managed to get a list of these permutations with python:
from sympy.utilities.iterables import multiset_permutations
from pprint import pprint
pprint(list(multiset_permutations(['A','A','A','B','B','B','C','C','C'])))
resulting in 1680 variations:
[['A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'C'],
['A', 'A', 'A', 'B', 'B', 'C', 'B', 'C', 'C'],
['A', 'A', 'A', 'B', 'B', 'C', 'C', 'B', 'C'],
['A', 'A', 'A', 'B', 'B', 'C', 'C', 'C', 'B'],
['A', 'A', 'A', 'B', 'C', 'B', 'B', 'C', 'C'],
['A', 'A', 'A', 'B', 'C', 'B', 'C', 'B', 'C'],
...
['C', 'C', 'C', 'B', 'B', 'B', 'A', 'A', 'A']]
How can i replace each letter for each line with the respective small images A.png, B.png and C.png, which are all square 1000 x 1000 px, with the first three 1000 px apart, and two more rows below? Thank you for your help!