Answer the question
In order to leave comments, you need to log in
How to implement the layout of images into a single image?
Good day. I have a task to combine pictures (81 pieces) from a folder into a new image. I presented the new image in the form of a 9x9 matrix. The problem is that the matrix is filled randomly, that is, the picture does not work. Who can tell me how to make sure that the images are correctly sorted (collected) into a new image.
Answer the question
In order to leave comments, you need to log in
It is difficult to advise without seeing the file format and how you actually collect the image. But if the question is how to split consecutive 81 files into a row / column, then you can do this. Let's say we're looping through our 81 sorted files. Then x,y will be:
for i in range(81):
x, y = divmod(i, 9)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question