convert pil ppmimageplugin ppmimagefile to array code example Example: pil image to numpy >>> pix = numpy.array(pic)