load_img(
path,
grayscale=False,
target_size=None
)
Defined in tensorflow/python/keras/_impl/keras/preprocessing/image.py.
Loads an image into PIL format.
path: Path to image filegrayscale: Boolean, whether to load the image as grayscale.target_size: Either None (default to original size) or tuple of ints (img_height, img_width).A PIL Image instance.
ImportError: if PIL is not available.
© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/keras/preprocessing/image/load_img