一个主流图片压缩方案的自动化脚本(利用 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.2.tar.gz
(3.4 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.2.tar.gz.
File metadata
- Download URL: img_compress-0.0.2.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e03afcc3611b94d32d939250eb34868d47655c535008a6a00833fd8f8f6f5ee
|
|
| MD5 |
077f9594244a3afd2ba13b89d1e840b2
|
|
| BLAKE2b-256 |
120681709f6f928407dc1d2e813ff2ee7f439828cc358b972baeaca8a2eb37e9
|
File details
Details for the file img_compress-0.0.2-py3-none-any.whl.
File metadata
- Download URL: img_compress-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.8 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 |
08e26737024805d756ec018a7a6004b8b5028378d424d9ff194a7aa2246bb617
|
|
| MD5 |
c540f7db1a1de784cd4cb7e5c167299b
|
|
| BLAKE2b-256 |
e967db78647e667a741ac22728fcdf07300f2056c4011b0552997c49e94a9cc2
|