Name

WriteImageFile — saves an image file, is called by WriteImage

Calling Sequence

Success = WriteImageFile(PixelList, Dimensions, ImagePath);

Parameters

PixelList

column or row vector of type uint8, contains all gray or color values of an image

Dimensions

row or column vector of type double, contains the number of rows, number of columns and number of channels

ImagePath

file name or complete path of the image file

Success

boolean, is %t if image was successfully saved and %f if an error occured

Description

This function saves an image to a file. It is called by WriteImage so you do not need to call this function yourself.

Examples

TestImageData = uint8(0 : 255); // gray values of test image are generated

Dimensions = cat(2, size(TestImage), 1);

ImagePath = 'contrib\IPD-3.3\demos\test.png';

Success = WriteImageFile(TestImageData, Dimensions, ImagePath);

See also

ReadImage, WriteImage, ReadImageFile, WriteImageFile