pil image ot numpyt array code example
Example 1: ndarray to pil image
from PIL import Image
image_from_array = Image.fromarray(nd_array)
Example 2: pil image to numpy
>>> pix = numpy.array(pic)
from PIL import Image
image_from_array = Image.fromarray(nd_array)
>>> pix = numpy.array(pic)