SIVP Toolbox
Last update : Nov., 2006

xs2im - Convert graphics to an image matrix.

### Calling Sequence

  `im = xs2im(win_num,[color])`

### Parameters

- `win_num`: Integer scalar or vector.
- `color`: Optional integer. 0 means black and white and 1 means color. The default value is 1.
- `im`: The returned image, uint8 type hyper-matrix.

### Description

`xs2im` convert the recorded graphics of the window `win_num` to an image matrix. This function works only if the selected driver is "Rec" in the window win_num or if the window is in "new style".

### Examples

        scf(0)
        plot2d()
        im = xs2im(0);
        imshow(im);

### Authors

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

### Availability

The latest version of SIVP can be found at

http://sivp.sourceforge.net

### See Also

`im2double`,