Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
I

imagekit

> 编程语言
Open source

ImageKit is a powerful and fast command-line tool for batch processing images.

181 stars0 likes1 views
WebsiteGitHub

About

ImageKit is a powerful and fast command-line tool for batch processing images.

ImageKit

ImageKit is a powerful, fast, and flexible command-line tool for batch image processing. Written in Rust, it leverages parallel processing to maximize performance, allowing you to effortlessly resize, control the quality of, and add highly customizable watermarks to entire directories of images.

[!IMPORTANT] Migration Notice: This project is now in Maintenance Mode (bug fixes only).

We are excited to announce the release of ImageKit2!

ImageKit2 is a complete rewrite powered by Rust. It provides the same easy-to-use Python bindings but with significantly higher performance, better memory safety, and modern features.

Please upgrade here: https://github.com/hzbd/imagekit2

中文

Features

  • Batch Processing: Recursively processes all images (.jpg, .jpeg, .png, .gif, .bmp, .webp) in a specified input directory.
  • Smart Scaling:
    • If only a width is provided, the height is calculated automatically to maintain the aspect ratio.
    • If only a height is provided, the width is calculated automatically.
  • Quality Control: Use the -q or --quality flag (1-100) to fine-tune the output quality, balancing file size and visual fidelity. Set to 100 for the best possible quality.
  • Powerful Watermarking:
    • Multi-language Support: Perfectly renders watermarks with mixed text, supporting major world scripts including Latin (for English, French, Spanish), Cyrillic (for Russian), Thai, and CJK (Chinese, Japanese, Korean)..
    • Highly Customizable: Add text watermarks in nine standard positions and freely set the font size.
    • Custom Colors: Precisely control watermark color and opacity using hex codes (e.g., RRGGBB or RRGGBBAA).
    • Intelligent Watermark Scaling: If the requested watermark is too large for an image, it is automatically scaled down to fit perfectly, ensuring it is never cropped.
  • ⚡ Blazing Fast Performance: Utilizes the Rayon library to process images in parallel, taking full advantage of multi-core CPUs.
  • Cross-Platform: Compiles and runs on Windows, macOS, and Linux.

⚙️ Installation & Build

[!NOTE] You can also directly download the pre-compiled binary package from the release page.

You will need to have Rust and Cargo installed.

  1. Clone the Repository

    bash
    git clone https://github.com/hzbd/imagekit.git
    cd imagekit
  2. Build the Project

    bash
    cargo build --release
  3. Locate the Executable

    After building, the executable will be located in the target/release/ directory.

Usage

Examples

Example 1: Add a watermark with mixed Chinese and English text

bash
./target/release/imagekit \
    -i example/img-src \
    -o example/img-out \
    --watermark-text "你好, World! - Test Watermark"

Example 2: Resize images and save at maximum quality

If you want to resize without quality loss for JPEGs, use --quality 100.

bash
./target/release/imagekit -i example/img-src -o example/img-out --width 1024 --quality 100

Example 3: Add an opaque black watermark (using default quality 85)

bash
./target/release/imagekit \
    -i example/img-src \
    -o example/img-out \
    --watermark-text "Confidential" \
    --watermark-color 000000FF

Command-Line Options

Option Flags Description Required/Optional Default
Input Directory -i, --input-dir The source directory containing images to process. Required -
Output Directory -o, --output-dir The directory where processed images will be saved. Required -
Width --width (Optional) Resize image width. Scales proportionally if height is omitted. Optional Original width
Height --height (Optional) Resize image height. Scales proportionally if width is omitted. Optional Original height
Watermark Text --watermark-text (Optional) The text content for the watermark. Optional -
Watermark Position --watermark-position (Optional) The position of the watermark on the image. Optional se
Font Size --font-size (Optional) The font size of the watermark text in pixels. Optional 24
Watermark Color --watermark-color (Optional) Watermark color in RRGGBB or RRGGBBAA hex format. Optional FFFFFF80 (semi-transparent white)
Quality -q, --quality (Optional) Set output quality (1-100). Affects JPEG and PNG compression. Optional 85
Output Format --output-format (Optional) Specify the output image format. Optional Original format

Available values for watermark-position:

  • nw: North-West, north: North, ne: North-East
  • west: West, center: Center, east: East
  • sw: South-West, south: South, se: South-East

Demo

bash
./target/release/imagekit -i example/img-src \
    -o example/img-out/ \
    --height 512 \
    --watermark-text "©良辰 | ちよ | 서연 | Stella | Éléonore | แก้ว" \
    --watermark-position se \
    --font-size 18 \
    --watermark-color ffffffFF \
    --output-format png

️ Development & Testing

If you'd like to contribute to the project:

  1. Clone the repository and prepare the fonts.
  2. Make your changes.
  3. Run tests to ensure all functionality is working as expected:
    bash
    cargo test

License

This project is licensed under the MIT License.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustimage-processingimage-resizeimagekitmulti-language

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言