open image using pil and convert into ndarray python code example Example: pil image to numpy >>> pix = numpy.array(pic)