Save Image Tool
Use the imsave
function to create a Save Image tool that
displays an interactive file chooser dialog box. Use this dialog box to navigate your
file system to determine where to save the image file and specify the name of the file.
Choose the graphics file format you want to use from among the image file formats listed
in the Files of Type menu. For more information about using
the tool, see Tips.
imsave
creates a Save Image tool in a separate figure that is
associated with the image in the current figure, called the target image.
imsave(
creates a Save Image tool
associated with the image specified by the handle h
)h
.
[
returns the full path to the file selected in filename
,user_canceled
] = imsave(___)filename
and
indicates whether you canceled the save operation.
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.
imsave
uses imwrite
to save the
image, using default options.
If you specify a file name that already exists, then
imsave
displays a warning message. Select
Yes to use the file name or No to
return to the dialog to select another file name. If you select
Yes, then the Save Image tool attempts to overwrite the
target file.
The Save Image tool is modal; it blocks the MATLAB® command line until you respond.