bug fix in grid

In case of 6 images 3rd image was also copied to 4th box missing the last image in the grid.
This commit is contained in:
Muhammad Usama 2022-08-28 15:39:09 +01:00 committed by GitHub
parent 38ed6393fa
commit 59be6c815d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,10 +88,11 @@ class PngWriter:
height = image_list[0].height
grid_img = Image.new('RGB', (width * cols, height * rows))
i = 0
for r in range(0, rows):
for c in range(0, cols):
i = r * rows + c
grid_img.paste(image_list[i], (c * width, r * height))
i = i + 1
return grid_img