Skip to content

mon6912640/TinyPngTool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TinyPngTool

基于python的tinypng图片压缩工具(在线压缩)

功能特性

1.调用tinypng的API进行在线图片压缩
2.支持命令行调用
3.内建本地缓存数据库,已经压缩过的图片会在本地缓存起来,如果检测有缓存,则直接从缓存取出来,免去了网络压缩的流程和重复图片压缩的时间
4.完善的异常处理机制,自动更换key、断线重连

使用方法

python TinyPngTool.py --source your_source_dir --output your_output_dir
参数说明:
--source 需要压缩的图片源目录
--output 压缩后图片输出的目录

TinyPng开发者key申请地址
https://tinypng.com/developers

参考

代码参考自以下库
https://github.com/fengqingxiuyi/LearningNotes

更多

一个基于Electron开发的优秀图片压缩工具(可离线使用)
https://github.com/meowtec/Imagine

About

基于python的tinypng压缩工具(在线压缩,带本地缓存功能)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published