## IMWRITE Write Matrix to Image File

Section: Input/Ouput Functions

### Usage

Write the image data from the matrix into a given file. Note that FreeMat's support for `imread` is not complete. Only some of the formats specified in the MATLAB API are implemented. The syntax for its use is

      imwrite(filename, A)
      imwrite(filename, A, map)
      imwrite(filename, A, map, alpha)

where `filename` is the name of the file to write to. The input arrays `A` contain the image data, `map` contains the colormap information (for indexed images), and `alpha` contains the alphamap (transparency). The returned values will depend on the type of the original image. Generally you can write images in the `jpg,png,xpm,ppm` and some other formats.