WriteImage(Image, FilePath);
2D or 3D matrix of type uint8, uint16, uint32, double or boolean
name or complete path of the image file
This function saves an image as a file. The image is saved as a three or single channel image of type uint8.
If Image is of type double or boolean, the gray or color values are scaled to the interval 0 - 255.
If image is of type uint16 or uint32 and the maximum gray or color value is below or equal to 255, the gray values are not modified. If the maximum gray value is greater than 255, the gray values greater than zero are scaled to the interval 1 - 255 and zero gray or color values stay zero.
OriginalImage = ReadImage('contrib\IPD-5.0\demos\teaset.png'); // image is loaded WriteImage(OriginalImage, 'contrib\IPD-5.0\demos\copy.png'); // copy of image is saved CopiedImage = ReadImage('contrib\IPD-5.0\demos\copy.png'); // copy is read figure(); ShowColorImage(OriginalImage, 'Original'); // original image is displayed figure(); ShowColorImage(CopiedImage, 'Copy'); // copy is displayed