一个主流图片压缩方案的自动化脚本(利用 tinify 实现)
Project description
一个主流图片压缩方案的自动化脚本(利用 tinify 实现)
实现三种图片输入的方式
- 用户指定需要压缩的图片文件名称
- 压缩当前文件夹下所有的 jpg/png/webp 图片(如果用户未指定图片)
- 将需要压缩的图片拖拽到我们的源文件上,从而实现自动压缩
支持图片的尺寸调整
- 输入宽度和高度(比如 600 800),表示按比例缩小图片,使其适合给定的尺寸
- 输入宽度(比如 600 0),表示按确定的宽度调整图片,高度适配
- 输入高度(比如 0 800),表示按确定的高度调整图片,宽度适配
- 如未输入宽度和高度,则表示按照原始分辨率来压缩图片
*** 需到tifiny官网申请API密匙 -> 传送门 ***
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
img_compress-0.0.1.tar.gz
(3.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file img_compress-0.0.1.tar.gz.
File metadata
- Download URL: img_compress-0.0.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
180d0a313fc85b1debe50da292a7403bcab805c6e71399f5feeb4f1d0bbd2550
|
|
| MD5 |
9002612a9db2edf29f0e20b85a5e3899
|
|
| BLAKE2b-256 |
b95b94f45ee5dbede5beb1639e0fa9405bf97c4b78ed7ff831173e4701083fe5
|
File details
Details for the file img_compress-0.0.1-py3-none-any.whl.
File metadata
- Download URL: img_compress-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fad1beb57529b1cbe202f58a7a27b052a9074e5daa63a4cfabe4f0945f82790
|
|
| MD5 |
f091cae63400b9f48276f29261667d6d
|
|
| BLAKE2b-256 |
e9033172220d16e3f9b396ed8b21334a06b11ff3255faf4dc8f798922cf5d16e
|