compress_image
Easily compress image files and adjust quality to reduce storage size.
Install
mkdir -p .claude/skills/compress-image && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/10980" && unzip -o skill.zip -d .claude/skills/compress-image && rm skill.zipInstalls to .claude/skills/compress-image
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
压缩图片文件大小,通过调整质量参数控制输出体积。当用户提到压缩图片、图片减肥、缩小图片体积、降低图片质量时使用。Key capabilities
- →Compresses image files
- →Adjusts quality parameters
- →Reduces image file size
How it works
It compresses image files by adjusting quality parameters to reduce file size while maintaining visual quality.
Inputs & outputs
When to use compress_image
- →Reducing image file size for web
- →Optimizing large photos
- →Compressing assets for deployment
About this skill
compress_image Skill
压缩图像文件,以减小其文件大小,同时尽量保持视觉质量
功能描述
将图像文件压缩为更小的体积,通过调整压缩质量参数控制输出文件大小。
所属分类
office/skills/image/compress_image/
调用方式
from skills.image import compress_image
compress_image(
input_file='./test.png',
output_file='./test_compressed.jpg',
quality=50
)
参数说明
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
input_file | str | 是 | - | 需要压缩的输入图像文件的路径 |
output_file | str | 是 | - | 压缩后的图像文件保存路径 |
quality | int | 是 | - | 压缩质量等级,取值范围 0 到 95。值越高,质量越好,文件越大 |
返回值
None
使用示例
from skills.image import compress_image
compress_image(input_file='./photo.jpg', output_file='./photo_small.jpg', quality=30)
原始函数
office.api.image.compress_image
When not to use it
- →When the user needs lossless compression
- →When the image format is not supported
Limitations
- →Quality parameter is lossy
- →Limited to supported formats
How it compares
It provides a simple, programmatic way to compress images within a Python environment.
Compared to similar skills
compress_image side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| compress_image (this skill) | 0 | 1mo | Review | Beginner |
| awq-quantization | 1 | 7mo | Review | Advanced |
| gptq | 1 | 7mo | Review | Advanced |
| autoresearch-speed | 0 | 1mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
awq-quantization
davila7
Activation-aware weight quantization for 4-bit LLM compression with 3x speedup and minimal accuracy loss. Use when deploying large models (7B-70B) on limited GPU memory, when you need faster inference than GPTQ with better accuracy preservation, or for instruction-tuned and multimodal models. MLSys 2024 Best Paper Award winner.
gptq
davila7
Post-training 4-bit quantization for LLMs with minimal accuracy loss. Use for deploying large models (70B, 405B) on consumer GPUs, when you need 4× memory reduction with <2% perplexity degradation, or for faster inference (3-4× speedup) vs FP16. Integrates with transformers and PEFT for QLoRA fine-tuning.
autoresearch-speed
tsilva
Unified Super Mario Bros emulator speed-improvement workflow for this repo. Use when Codex is asked to optimize, profile, benchmark, or coordinate self-improvement research for Super Mario Bros NES throughput, including N-agent proposal and implementation waves, Modal benchmark tournaments, stale ca
transmit-test
KI3P
Run the PTT signal integrity test on the radio transmitter hardware. Use when the user asks to test the transmitter, run a PTT test, check I/Q outputs, or verify transmit signal quality. Requires an Analog Discovery 2 connected to the radio.
gemini-logo-remover
bear2u
Remove Gemini logos, watermarks, or AI-generated image markers using OpenCV inpainting. Use this skill when the user asks to remove Gemini logo, AI watermark, or any logo/watermark from images.
slack-gif-creator
anthropics
Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."