Adding image numbers on grids

New grid option in settings enables adding of image numbers on grids. This makes identifying the images, especially in larger batches, much easier.

Revert "Adding image numbers on grids"

This reverts commit 3530c283b4b1d3a3cab40efbffe4cf2697938b6f.

Implements Callback for image grid loop

Necessary to make "Add image's number to its picture in the grid" extension possible.
This commit is contained in:
AlUlkesh
2022-12-28 22:18:19 +01:00
parent 4af3ca5393
commit 5f12b23b8b
2 changed files with 21 additions and 0 deletions

View File

@@ -43,6 +43,7 @@ def image_grid(imgs, batch_size=1, rows=None):
grid = Image.new('RGB', size=(cols * w, rows * h), color='black')
for i, img in enumerate(imgs):
script_callbacks.image_grid_loop_callback(img)
grid.paste(img, box=(i % cols * w, i // cols * h))
return grid