Go to file
Matteo Paonessa 5275b23fa9
Update USAGE.md
2025-03-04 08:21:54 +01:00
.github Fix release version patterns 2025-03-02 20:37:33 +01:00
.idea Resize options added 2024-12-14 12:11:09 +01:00
docs Update USAGE.md 2025-03-04 08:21:54 +01:00
samples Basic tests and bugfixes 2024-12-21 09:55:26 +01:00
src Baseline JPEG flag 2025-02-21 16:31:36 +01:00
.gitignore Basic working example (no resize, no convert) 2024-12-13 20:31:17 +01:00
CHANGELOG.md CI and docs updates 2024-12-27 20:02:08 +01:00
Cargo.lock Fix to #82 + added chroma subsampling option #81 2025-02-21 16:04:18 +01:00
Cargo.toml Fix to #82 + added chroma subsampling option #81 2025-02-21 16:04:18 +01:00
LICENSE.md Styling improvements and license 2018-01-01 17:17:33 +01:00
README.md Update README.md 2025-03-02 21:32:04 +01:00
rustfmt.toml CI and docs updates 2024-12-27 20:02:08 +01:00

README.md

Caesium Command Line Tools

Test Clippy Code formatting

caesiumclt is a command line tool for image compression written in Rust, supporting lossy, lossless, and maximum size compression. Based on libcaesium.

demo

Table of Contents

Features

  • Quality-based lossy compression
  • Lossless compression - the very same image is returned
  • Maximum size compression - the image is compressed to a specific size
  • Resize images
  • Convert to different formats
  • EXIF metadata preservation
  • Recursive directory compression
  • Folder structure preservation
  • File timestamp preservation
  • Custom suffix for output files
  • Fast and customizable multithreaded processing

Supported formats

Format Lossy Lossless
JPEG
PNG
WebP
TIFF

Getting started

Binaries

You can download the latest binaries from the releases page. Supported platforms are:

  • Windows (x86_64)
  • macOS (x86_64/aarch64)
  • Linux (x86_64/aarch64)

Installation from source

If you have Rust installed, you can install the tool using Cargo:

cargo install --git https://github.com/Lymphatus/caesium-clt caesiumclt

If you instead want to build the tool refer to the Development section.

Usage

For a full list of all flags and options refer to the full docs.

Examples

Losslessly compress image1.jpg, located in the home directory, into a folder called output

$ caesiumclt --lossless -o ~/output/ ~/image.jpg

Compress image1.jpg, located in the home directory, into a folder called output with lossy compression and quality set to 80

$ caesiumclt -q 80 -o ~/output/ ~/image.jpg

Losslessly compress image1.jpg, located in the home directory, into a folder called output and keeps EXIF metadata and original file date information

$ caesiumclt --lossless -e --keep-dates -o ~/output/ ~/image.jpg

Losslessly compress Pictures folder and subfolders, located in the home directory, into a folder called output

$ caesiumclt --lossless -R -o ~/output/ ~/Pictures

Losslessly compress Pictures folder and subfolders, located in the home directory, into a folder called output retaining the input folder structure

$ caesiumclt --lossless -RS -o ~/output/ ~/Pictures

Development

Requirements

Build

cargo build