scipy.misc.fromimage¶
-
scipy.misc.fromimage(*args, **kwds)¶ fromimageis deprecated!fromimageis deprecated in SciPy 1.0.0. and will be removed in 1.2.0. Usenp.asarray(im)instead.Return a copy of a PIL image as a numpy array.
This function is only available if Python Imaging Library (PIL) is installed.
Parameters: - im : PIL image
Input image.
- flatten : bool
If true, convert the output to grey-scale.
- mode : str, optional
Mode to convert image to, e.g.
'RGB'. See the Notes of theimreaddocstring for more details.
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.
