PngImageFile shape 3 dimension or 4 dimension code example Example: pil image to numpy >>> pix = numpy.array(pic)