> For the complete documentation index, see [llms.txt](https://docs.augelab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.augelab.com/function-blocks/blocks-reference/input-output/outputs-exports/multi-image-write.md).

# Multi Image Write

This function block saves multiple images to disk when a write condition is active. It supports optional compression and accepts a folder path and filename template to organize saved files.

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

`Folder Path` input socket Provide full folder path where images will be saved.\
`File Name` input socket Provide base file name (without extension). A timestamp or custom text can be used.\
`Write Condition` input socket Boolean trigger that starts the save operation when True.\
`Input Images` input socket Accepts one or multiple images (list). Each image will be saved as a separate file.

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

This function block does not produce any outputs.

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

`Compress Image?` Checkbox When enabled, images are saved as JPEG with reduced quality for smaller file size. When disabled, images are saved as PNG (lossless).

## 🎨 Features <a href="#features" id="features"></a>

* Save many images at once using a single action.
* Optional JPEG compression to reduce storage usage.
* Customizable folder and base file name to organize saved files.
* Logs success or error messages for each saved file.

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

1. Provide a path to `Folder Path` (or use a folder selection block upstream).
2. Set a base name in `File Name`. Use a time string or a counter to avoid collisions.
3. Connect a boolean signal to `Write Condition`; set it to True to trigger saving.
4. Feed one or more images into `Input Images`. Each image will be written to disk with the base name and an index suffix.
5. Toggle `Compress Image?` if you prefer JPEG compression over PNG.

## 📊 Evaluation <a href="#evaluation" id="evaluation"></a>

When the `Write Condition` is True and valid inputs are present, the block attempts to save each image in the provided list. Successful saves are logged; failures report an error (for example when the folder is invalid or disk write fails).

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

* Use `Choose Folder` to let users pick the save location interactively and feed its output to `Folder Path`.
* Combine with `Date-Time` to generate unique file names automatically (e.g., timestamp in `File Name`).
* If you need to preview images before saving, send them to `Show Image` first.
* Reduce image size before saving to save space and speed up writes by using `Image Resize` or `Image Resizer` upstream.
* For saving multiple related images as a single visual summary, create a montage with `Collage Images` and then save the collage.
* If you also need continuous logging of frames, consider pairing with `Image Logger` for automatic archival workflows.

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

* Invalid folder errors: check that `Folder Path` exists and is writable. Use `Choose Folder` to avoid typos.
* No images saved: ensure `Input Images` is connected and `Write Condition` is True at the evaluation moment.
* Corrupted or unexpected file formats: toggle `Compress Image?` to switch between JPEG and PNG and verify downstream compatibility.
* Large number of images slows the system: resize images with `Image Resize` before writing or enable compression to reduce disk I/O.
