Image Write

This function block saves input images to disk when a save condition is active. It supports optional compression (JPEG) and automatic naming, and is intended for easy export of captured or processed images.

πŸ“₯ Inputs

Folder Path Full folder path where the image will be saved. If left empty, the current working folder is used.

File Name Optional file name without extension. If left empty, a timestamp-based name is used automatically.

Save Boolean trigger that controls whether the image will be written to disk. Provide TRUE to save, FALSE to inhibit saving.

Input Image Image to be saved. Accepts any common image format coming from previous blocks.

πŸ“€ Outputs

This function block does not produce output sockets. It reports status through log messages visible in the UI.

πŸ•ΉοΈ Controls

Compress Image Checkbox to toggle saving as a compressed JPEG file instead of an uncompressed PNG. Use compression to reduce file size when disk space or transfer bandwidth is a concern.

🎨 Features

  • Save on-demand using a boolean Save input.

  • Automatic filename fallback using a timestamp when no name is given.

  • Option to save as compressed JPEG or lossless PNG.

  • Informative log messages confirming success or reporting errors (missing folder, permission, or missing image).

  • Simple UI control for enabling/disabling compression.

βš™οΈ Running mechanism

When the Save input is active (TRUE), the block attempts to write the current Input Image to the path defined by Folder Path and File Name. If Compress Image is checked, the image is saved as JPEG to reduce size; otherwise it is saved as PNG. If the folder does not exist or the image is missing, the block logs an error instead of saving.

πŸ“ Usage Instructions

  1. Provide a destination using the Folder Path input or leave it empty to use the default folder.

  2. Optionally set a File Name or leave empty to use an automatic timestamped name.

  3. Feed the image you want to save into the Input Image socket.

  4. Activate the Save input (for example with a manual or programmatic trigger) to write the file.

  5. Use the Compress Image checkbox to choose between JPEG (smaller) or PNG (lossless).

πŸ’‘ Tips and Tricks

  • Use Choose Folder to let users pick the target folder interactively before saving.

  • Combine with String Input or Date-Time to build descriptive, timestamped file names.

  • Preview the image with Show Image before saving to verify content.

  • If images are large, add Image Resizer before this block to reduce saved file size and improve throughput.

  • Use Image ROI Select or Draw Result On Image to crop or annotate images prior to saving (for examples: saving detected regions or overlayed results).

  • For high-rate logging of many images, consider using Image Logger or Record Video instead of saving individual frames on every trigger.

πŸ› οΈ Troubleshooting

  • Folder not existing or write permission error: verify the path provided by Folder Path and use Choose Folder to avoid typos.

  • "No image data available" error: ensure the Input Image socket is receiving valid image data before sending the Save trigger. Preview with Show Image to confirm.

  • Large files or slow saves: enable Compress Image or insert Image Resizer to reduce resolution before saving.

  • Unexpected filenames: include Date-Time or a custom String Input to generate unique, descriptive names and avoid overwriting.

If saving repeatedly in short intervals, ensure the destination storage has sufficient free space and write performance for your scenario.

Last updated

Was this helpful?