【问题标题】:Convert png to dds with python?用python将png转换为dds?
【发布时间】:2018-03-05 02:46:54
【问题描述】:

需要转换 50 张图片,手动操作会太长。 Сan找不到具有这种功能的库。

我试过 Pillow,但它无法保存在 dds 中。

【问题讨论】:

    标签: python png dds-format


    【解决方案1】:

    我发现我可以在 python 中使用命令行应用程序,所以图像魔术可以满足我的所有需求。

    【讨论】:

      【解决方案2】:

      看来这个库可能对你有用,看看:https://github.com/ducakar/img2dds

      【讨论】:

        【解决方案3】:

        您可以使用Wand 库:

        from wand import image
        
        with image.Image(filename='your.png') as img:
            img.compression = 'dxt5'
            img.save(filename='your.dds')
        

        【讨论】:

          猜你喜欢
          • 2018-04-07
          • 2020-04-29
          • 2016-10-31
          • 2015-10-04
          • 2011-06-27
          • 2011-06-21
          • 2014-03-17
          • 2020-05-19
          • 2011-01-27
          相关资源
          最近更新 更多