How should I set the GMIC for how I want I want to montage in Gimp 3.2?

Hi, new to the plugin.

I am trying to set a number of rows and columns to combine all my 256x145 resolution images (around 100 images), so that would mean I set 7 rows and 4 columns to fill up most of a 1024x1024 image, so that when the plugin takes the needed number of images to do that. then it continues to arrange the next 7 rows x 4 columns on another layer.

Typically I may want to do the same with 341 width images with other rows X columns but not now. Now I will be combining same resolution images that are 256x145.

I don’t know what I need to set to do it like that.

I read and searched that in order to make a bunch of pictures (100 layers of small images) I need to use Arrays & Tiles - Montage.

I didn’t get any meaningful result with custom Layout, so I tried Montage Type: Horizontal Array. This does put a lot of pictures in a row before starting the next row but it adds more than needed in the first row.

I do not need any framing around the pictures so I set all these things frames, spaces between to 0.

I would suggest using the “Custom Code” filter for that task.
What you need is actually using the G’MIC internal command : append_tiles 4,7 that will generate as many 4x7-arranged outputs as necessary to fit your number of input images.
This works because all your images have the same resolution.

  1. Open GIMP and open all your images as new layers.

  1. Open G’MIC-Qt, select fillter Various / Custom Code [Global], then set Input Layers to All, and type command
append_tiles 4,7

in the main code text widget.

  1. Click “OK” to apply this filter. You now have possibly multiple output layers.

(here, 2 layers as I’ve used 56 images).

1 Like

Thanks very much for the detailed steps, it works indeed! Gone are the days of Alignment tool which was never good enough for this and using Film strip.

Just Can I remove the borders of black that form between them? It starts with some black borders and between the rows

You can crop it before using append_tiles. See this documentation here. G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing - Reference Documentation - crop

Since your images are 256x145, crop 0,0,255,143 would do.

1 Like

If you have black borders that’s because:

  • Either one or several of your images are slightly higher than the others, and the append_tiles function fill this difference of heights with black.
  • Either you already have a black border in your images.

As @Reptorian said, you may want to force the image size of each layer before applying the append_tiles command, so typing this command instead:

resize 256,145
append_tiles 4,7

This ensures all input images have exactly the same size (beware, it uses nearest-neighbor interpolation by default).

1 Like

Thanks both, that removed them

Just wanted to say that as I tested today I did with crop or resize including cropping from the Crop to Selection to ensure they are the same and I noticed it creates a lot of single layers where the top most layer image for example is put as a standalone like in the pic below and a lot of layers with single picture some of which are from the top layers. I would expect them to be also on the top.

Overall works but need to get same results they need to fill up a layer before they get single. I was following the above settings

This may happen if you try to append RGB and RGBA images together, because in that case, RGB images will get an additional channel set to 0 by the append_tiles command.
Proposed suggestion : Force all your image to be in RGB or RGBA before resizing/appending them, with command to_rgb or to_rgba.

1 Like

Finally now these are correct and I get indeed only the 4x7 layers then whatever remains tiles on the last layer. I have 145 images, so now I correctly get 5 layers with 4x7 tiles, which makes it 140 and last layer with last 5 images.

I did have some with alpha channel images and no wonder the Preview was showing a single image on alpha BG , now I add the alpha channel to all layers and when I combine, nothing seems missing.

Before that some images were duplicated as single image on a layer. last images were not included at all in the 4x7 tiles layers and were instead somewhere away as single layers.

But now all aligns, all are there, so the take is:

  • Make them exact sizes to avoid difficulties, crop to selection or resize if needed
  • Have them the same channels - RGBA ( as I prefer) or RGB - had no idea this mattered

Thanks again :slight_smile:

1 Like

That’s because append_tiles will always replace ‘missing data’ (like a missing row, column, or channel) by filling it with 0, and in the case of an alpha channel, this means adding a fully transparent alpha channel, leading to actually invisible RGBA images, if only RGB is specified.

Happy to see that everything works as expected right now :+1:

1 Like