SciFiReaders.readers.generic.image.read_image¶
- SciFiReaders.readers.generic.image.read_image(image_path, as_grayscale=True, as_numpy_array=True, *args, **kwargs)[source]¶
Read the image file at image_path into a numpy array either via numpy (.txt) or via pillow (.jpg, .tif, etc.)
- Parameters
- Returns
image – if as_numpy_array is set to True - Array containing the image from the file image_path. If as_numpy_array is set to False - PIL.Image object containing the image within the file - image_path.
- Return type
numpy.ndarray
orPIL.Image.Image