当前位置:首页 > Python教程 > python技巧

图像的存储格式转化(python实现)

  • jpg 格式转化为ppm格式
            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();

 其它格式转换类似。

原文:https://www.cnblogs.com/cc111/p/10477957.html


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!