← 返回
未分类

images-compressor

Compress images, reduce file size, and convert between formats (PNG, JPG, WebP). Use when user wants to: (1) compress/shrink images, (2) reduce image file size, (3) convert image format, (4) batch process images, (5) optimize images for web.
Compress images, reduce file size, and convert between formats (PNG, JPG, WebP). Use when user wants to: (1) compress/shrink images, (2) reduce image file size, (3) convert image format, (4) batch process images, (5) optimize images for web.
user_ee3aee92
未分类 community v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 94
下载
💾 0
安装
1
版本
#latest

概述

author:jm-jsjkxyjs02-xzh-1501

Image Compressor

Overview

Compress images with configurable quality and format conversion. Supports PNG, JPG, and WebP output. Each output image is verified after compression to ensure it opens correctly.

Quick Start

# Compress a single image (default quality 85, keep original format)
python scripts/compress_image.py input.jpg

# Compress with specific quality and convert to WebP
python scripts/compress_image.py input.png -q 70 -f webp -o compressed/

# Batch compress all images in a folder
python scripts/compress_image.py images/ -q 80 -f jpg -o output/

Usage

Arguments

ArgumentShortDefaultDescription
---------------------------------------
inputrequiredInput image file or directory
--quality-q85Compression quality (1-100)
--format-fsame as inputOutput format: png, jpg, webp
--output-o./compressed/Output directory

Quality Guidelines

QualityUse Case
-------------------
90-100High quality, archival
75-89Default (85), good balance
50-74Web use, smaller files
1-49Thumbnails, previews

Supported Formats

FormatReadWriteNotes
----------------------------
PNGLossless support
JPG/JPEGBest for photos
WebPBest web format
BMPConvert to other formats
GIFConvert to other formats

Script Reference

See scripts/compress_image.py for the compression script. It uses Pillow for all image operations. Output files are validated by re-opening after write.

版本历史

共 1 个版本

  • v1.0.0 Initial release 当前
    2026-05-23 15:40 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

design-media

Openai Whisper

steipete
使用 Whisper CLI 进行本地语音转文字(无需 API 密钥)
★ 330 📥 93,462
design-media

Nano Banana Pro

steipete
使用 Nano Banana Pro (Gemini 3 Pro Image) 生成或编辑图像。支持文生图、图生图及 1K/2K/4K 分辨率,适用于图像创建、修改及编辑请求,使用 --input-image 指定输入图像。
★ 428 📥 116,595
design-media

Video Frames

steipete
使用 ffmpeg 从视频中提取帧或短片。
★ 133 📥 52,774