# Image Concatenate

This function block merges multiple images into a single image by placing them side-by-side (horizontal) or one after another (vertical). It automatically aligns images by adding borders when input images have different dimensions so you get a clean, single output image.

## 📥 Inputs <a href="#inputs" id="inputs"></a>

* `Image List` Input socket that accepts one or more images to be concatenated (multiple images supported).

## 📤 Outputs <a href="#outputs" id="outputs"></a>

* `Image` Output socket that provides the concatenated image.

## 🕹️ Controls <a href="#controls" id="controls"></a>

* `Relation` Dropdown to choose the concatenation direction.
  * Choose between HORIZONTAL or VERTICAL arrangement.

## 🎯 Key Features <a href="#features" id="features"></a>

* Automatic alignment: when input images differ in width or height, the block adds borders to match sizes so images align correctly.
* Supports multiple inputs: feed a list of images and the block will produce a single combined image.
* Simple orientation switch: toggle between horizontal and vertical concatenation with the `Relation` control.

## ⚙️ Running mechanism <a href="#running-mechanism" id="running-mechanism"></a>

When executed, the block reads the provided image list, ensures each image has matching dimensions by adding borders if needed, and then merges them according to the chosen `Relation`. The resulting image is sent to the `Image` output socket for downstream blocks or display.

## 📝 Usage <a href="#usage" id="usage"></a>

1. Provide images to the `Image List` input — you can connect multiple image-producing blocks or a list of images.
2. Select the desired layout with the `Relation` dropdown.
3. Read the combined result from the `Image` output and use it for display, logging, or further processing.

## 💡 Tips and Tricks <a href="#tips-and-tricks" id="tips-and-tricks"></a>

* If you want consistent results without visible borders, use `Image Resizer` or `Image Resize` before this block to make all images the same size.
* To control padding color or add custom margins, prepare images with `Image Padding` first, then concatenate.
* Crop inputs to the exact regions you want to combine using `Image ROI Select` or `Image ROI` before feeding them here.
* Use `Show Image` to preview the concatenated result interactively.
* For saving or recording the combined output, connect the `Image` output to `Image Logger` or `Image Write`.
* If you want a collage-style layout with borders indicating OK/NOK states, consider `Collage Images` as an alternative or follow-up block.

## 🛠️ Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

* Unexpected black borders: images have different aspect ratios. Either accept the borders, or use `Image Resizer` / `Image Padding` / `Image ROI Select` to make input sizes match.
* Empty or missing output: ensure every input in the `Image List` is a valid image. Use an image preview block like `Show Image` upstream to verify inputs.
* Very tall or wide output: choose VERTICAL or HORIZONTAL `Relation` appropriately or resize inputs to a manageable dimension before concatenation.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.augelab.com/function-blocks/image-transformations/operations/image-concatenate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
