convert image to ndarray in pillow code example Example: pil image to numpy >>> pix = numpy.array(pic)