<< imsubtract SIVP - Scilab Image and Video Processing Toolbox ind2rgb >>

SIVP - Scilab Image and Video Processing Toolbox >> SIVP - Scilab Image and Video Processing Toolbox > imwrite

imwrite

Write image to file

Calling Sequence

ret=imwrite(im, filename)

Parameters

im
im can be an M-by-N (greyscale image) or M-by-N-by-3 (color image) matrix. If im is not of class uint8, imwrite will convert the datatype before writing using im2uint8(im).
filename
A string that specifies the name of the output file.
ret
Return value. If the image is successfully writed into a file, ret will be 1.

Description

imwrite writes a matrix into a image file. The format of the file is inferred from the extension in the filename parameter. Currently the following file formats are supported:

Examples

im=rand(200,300);
ret = imwrite(im, 'rand.png');

Authors

Bugs and Shortcomings

Images with a palette are not supported.

Availability

The latest version of SIVP can be found at

http://sivp.sf.net

See Also

<< imsubtract SIVP - Scilab Image and Video Processing Toolbox ind2rgb >>