Save Image Tool
[filename, user_canceled] = imsave(…)
imsave creates a Save Image tool in a separate
figure that is associated with the image in the current figure, called
the target image. The Save Image tool displays an interactive file
chooser dialog box (shown below) in which you can specify a path and
filename. When you click Save, the Save Image
tool writes the target image to a file using the image file format
you select in the Files of Type menu.
save the image, using default options.
If you specify a filename that already exists,
a warning message. Select Yes to use the filename
or No to return to the dialog to select another
filename. If you select Yes, the Save Image tool
attempts to overwrite the target file.
Note: The Save Image tool is modal; it blocks the MATLAB® command line until you respond.
imsave(h) creates a Save Image tool associated
with the image specified by the handle
be an image, axes, uipanel, or figure handle. If
an axes or figure handle,
imsave uses the first
image returned by
[filename, user_canceled] = imsave(…) returns
the full path to the file selected in
If you press the Cancel button,
In contrast to the Save as option in the figure File menu, the Save Image tool saves only the image displayed in the figure. The Save as option in the figure window File menu saves the entire figure window, not just the image.
imshow peppers.png imsave