SIVP Toolbox
Last update : Oct, 2006

imwrite - Write image to file

Calling Sequence

ret=imwrite(im, filename)

Parameters

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:

* Windows bitmaps - BMP, DIB;
* JPEG files - JPEG, JPG, JPE;
* Portable Network Graphics - PNG;
* Portable image format - PBM, PGM, PPM;
* Sun rasters - SR, RAS;
* TIFF files - TIFF, TIF.

Examples

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

Authors

Shiqi Yu <shiqi.yu[at]gmail.com>

Bugs and Shortcomings

Images with a palette are not supported.

Availability

The latest version of SIVP can be found at

http://sivp.sourceforge.net

See Also

imread,  imshow,  imfinfo,