1 from PIL import Image 2 import cv2 3 4 img = Image.open("/home/cc/test/feature_kindsof/demo1.jpg") 5 img.save("/home/cc/test/feature_kindsof/demo1.ppm") 6 img.show();
其它格式转换类似。