def Image.open(fp, mode='r'):'''
Opens and identifies the given image file.
This is a lazy operation; this function identifies the file,
but the file remains open and the actual image data is not read
from the file until you try to process the data.
file--A filename(string) or a file object.
mode
''''''
The Image Class
open()
new()
frombytes()
'''def Image.load():'''
Allocates storage for the image and loads the pixel data.
In normal cases, you don't need to call this method,
since the Image class automatically loads an opened image
when it is accessed for the first time.
This method will close the file associated with the image.
'''def Image.close():'''
Close the file pointer, if possible.
This operation will destroy the image core and release it's memory.
The image data will be unusable afterward.
This function is only required to close images that have not had
their file read and closed by the load() method.
'''
import numpy as np
# 'Image' object is not subscriptable# 'Image' object is not callable
PILfrom PIL import Imagedef PIL.Image.open(fp, mode='r'): ''' Opens and identifies the given image file. This is a lazy operation; this function identifies the file, but the file remains open ...