Install any skill in seconds. Free to start, no credit card required.
Get Started Free →dongsheng123132/image-compress
图片压缩/转换 - 批量压缩、改尺寸、转格式(jpg/png/webp),本地处理不失隐私
Passed 0 of 14 test cases with the skill, and 14 of 14 without it.
1 fixed3 passed either way16 still failing2 broke
Tokens, turns and time describe resource use, not a dollar price.
A test case the skill fixed. Same model, same prompt, with and without the skill.
When saving a JPEG image using Python to optimize file size, should the `optimize` parameter be omitted to speed up execution?
| Checked | Without skill | With skill |
|---|---|---|
| Sets `optimize=True` in the Pillow save call. | Missed | Passed |
The instructions your model reads when the skill loads.
帮用户压缩图片体积、调整尺寸、转换格式,全部本地处理,照片不外传。
用 Bash 工具,Python 的 Pillow 库(跨平台、纯本地):
python -c "import PIL" 2>/dev/null || pip install -q Pillow
# 单张压缩(质量 75,宽度限制 1600px 等比缩放)
python - <<'PY'
from PIL import Image
im = Image.open("input.jpg")
if im.width > 1600:
im = im.resize((1600, int(im.height*1600/im.width)))
im.convert("RGB").save("output.jpg", "JPEG", quality=75, optimize=True)
print("已压缩 -> output.jpg")
PY
# 批量:当前目录所有 jpg/png -> webp(体积更小)
python - <<'PY'
from PIL import Image
import glob, os
for f in glob.glob("*.jpg") + glob.glob("*.png"):
out = os.path.splitext(f)[0] + ".webp"
Image.open(f).save(out, "WEBP", quality=80)
print(f"{f} -> {out}")
PY
test cases passed, vs 14 / 14 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.