FreeMat: IMREAD Read Image File To Matrix

FreeMat

- Main Page
- Related Pages

IMREAD Read Image File To Matrix

Section: Input/Ouput Functions

# Usage

Reads the image data from the given file into a matrix. 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

      [A,map,alpha] = imread(filename)

where `filename` is the name of the file to read from. The returned 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 read images in the `jpg,png,xpm,ppm` and some other formats.