Block Category: Signal Consumer
Input Image Requirements: None
Description: The Save Image block saves an image to a file.
The Save Image block has three inputs:
• Enable: When the enable connector is high, the image is saved. When the enable connector is zero, the image is not saved.
• Image: Indicates the image to be saved.
• Image Path: Overrides the Save As parameter in the Save
Image dialog box and uses the input connector value to specify the image path
for the saved image. If a directory is not specified, the image is saved to the
current directory. The Image Path input connector is displayed when you
activate the Use input connector value to specify the image path in the
Save Image dialog box.
The Image Path input connector accepts only
constant blocks. The following image path formats are accepted in the constant
block:
“drive:\\directory\\<…>\\filename.type”
“drive:/directory/<…>/filename.type”
The following syntax rules apply:
• The double quotation marks are required notation.
• If a directory is not specified, the image is saved to the current directory.
Use input connector value to specify the image path: Saves the image to the image path specified on the Image Path input connector When Use input connector value to specify the image path is activated, Save As is grayed out.
Save As: Saves a copy of the image to the specified location. Click … to select a location. You must always specify an image name and type. The file type does not have to match the original image, but it must be BMP, JPEG, JPG, or PNG. If you do not specify a location, the image is saved to the current directory. When Use input connector value to specify the image path is activated, Save As is grayed out.
Example
In this example, the Save Image block uses the Image Path input connector value to save the cat image to C:\\Tech Support\\Diagrams\\cat.bmp.