### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.12 Reference Guide (DRAFT) »
- Miscellaneous routines (`scipy.misc`) »

# scipy.misc.fromimage

`scipy.misc.``fromimage`(im, flatten=0)

  Return a copy of a PIL image as a numpy array.

  Parameters : | im : PIL image Input image. flatten : bool If true, convert the output to grey-scale.
  Returns : | fromimage : ndarray The different colour bands/channels are stored in the third dimension, such that a grey-image is MxN, an RGB-image MxNx3 and an RGBA-image MxNx4.

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.12 Reference Guide (DRAFT) »
- Miscellaneous routines (`scipy.misc`) »