Giter Site home page Giter Site logo

ggtinypng's Introduction

GGTinypng

批量压缩png和jpg图片python脚本 减少图片50%以上的大小,肉眼看不出差别。减量不减质。 图片数量少的话可以在tinypng.com上试一下。看下效果。

已经支持子文件夹里面的图片,会按原始的相对路径存放到输出文件夹内

7.30 新加功能:一条命令压缩整个项目内的图片。

显著降低app的大小

使用方法

可以使用alias来简化命令 python3 tinypng.py -i -o

-o 参数可以为空,因为要遍历picDocPath子文件夹 所以默认outputDocPath改为picDocPath父目录 内的outputTinypng文件夹,与picDocPath同级。

7.30 新参数:python3 tinypng.py -r <项目路径或者项目内某个图片文件夹的路径>

-r 参数会压缩文件夹内的图片并替换原图片

https://tinypng.com/developers 免费申请自己的key 每key每月免费压缩500个图

默认并发数为10 可以自己调整

##to do

如果有时间的话可能会做成处理mac程序或者xcode插件。不过短时间内不会,因为我自己用的话 脚本就足够了。

ggtinypng's People

Contributors

ylovern avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.