# Multi Image Write

This function block allows you to save multiple images to a specified folder when a defined condition is met. It provides options for compressing images and customizing the file naming convention.

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

`Folder Path` The directory where the images will be saved.

`File Name` The base name for the saved files. Each file will append a unique identifier.

`Write Condition` A boolean condition that, when true, triggers the image saving process.

`Input Image List` A list containing the images you wish to save.

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

This function block does not produce any outputs.

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

`Compress Image?` A checkbox that allows you to choose whether to compress the saved images. If checked, images will be saved in JPEG format with lower quality.

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

`Flexible File Naming` The block allows you to specify a name for your files, ensuring organized storage.

`Image Compression` Users can choose to save images in a compressed format, helping to save disk space.

`Error Logging` The block provides detailed logging for successful saves and any encountered errors, keeping track of file activities.

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

1. **Set Folder Path**: Connect a string input that specifies where the images should be saved.
2. **Name Your Files**: Specify a base file name for your saved images through the `File Name` input.
3. **Define Write Condition**: Set the `Write Condition` to true when you want to trigger the process of saving images.
4. **Provide Images**: The `Input Image List` should be populated with the images you wish to save.
5. **Evaluate**: Run the block to save the images as specified.

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

When executed, this function block will save the provided images to the specified folder path, only if the write condition is active.

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

<details>

<summary>Organizing Outputs</summary>

Consider using a timestamp or unique identifier in your `File Name` to avoid overwriting previous files, especially when saving multiple images.

</details>

<details>

<summary>Image Formats</summary>

Utilize the compression checkbox to save space, especially when dealing with large datasets. JPEG quality can be adjusted to balance between quality and size.

</details>

<details>

<summary>Batch Image Saving</summary>

For saving a large number of images, ensure that your image list input is correctly populated and the write condition is managed effectively to avoid data loss.

</details>

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

<details>

<summary>Folder Not Found Error</summary>

If receiving an error about the folder not existing, double-check the path provided to ensure it is correct and the directory is accessible.

</details>

<details>

<summary>No Image Data Error</summary>

If the log shows "No image data available", ensure that the `Input Image List` contains valid image data before evaluating the block.

</details>
