Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Cropper

A compact desktop image cropper written in Rust. It uses a native desktop window—without Node.js, npm, Electron, Chromium, or ImageMagick at runtime—and performs crop operations directly on the decoded pixels in memory.

Image Cropper icon

Features

  • Native Linux and Windows desktop application.
  • Native file picker and drag-and-drop opening.
  • Rectangular crop selection: draw a new region, drag it to move it, or adjust any of its four corner handles.
  • Direct in-process crop algorithm—no external convert command.
  • Numbered output names: imagecrop1.ext, imagecrop2.ext, and so on.
  • JPEG, PNG, GIF, WebP, BMP, TIFF, ICO, and AVIF support through Rust crates.
  • HEIC/HEIF support through the libheif codec runtime. Linux and Windows installer scripts bundle the runtime libraries alongside the compiled application. HEIC and HEIF crops save as JPEG for broad compatibility.

Build and run

Linux

Requirements: a Rust toolchain, a C/C++ compiler, pkg-config, the libheif development package, and the normal graphics development packages required by the window system.

cargo run

Build an optimized binary:

cargo build --release

Windows

Requirements: the Rust MSVC toolchain, Visual Studio Build Tools with C++ support, CMake, and vcpkg.

Install the HEIC codec dependency once in vcpkg:

vcpkg install libheif:x64-windows
$env:VCPKG_ROOT = 'C:\path\to\vcpkg'
$env:VCPKGRS_DYNAMIC = '1'
cargo run --release

Build an optimized executable:

cargo build --release

Install

The install scripts build the release binary if needed, then install it for the current user. End users run the compiled binary and bundled runtime files—they do not need Node.js or npm.

Linux application panel

./scripts/install-linux.sh

This installs the executable under ~/.local/share/imgcrop, adds an imgcrop launcher in ~/.local/bin, and creates a desktop entry in ~/.local/share/applications.

To remove it:

./scripts/uninstall-linux.sh

Windows Start menu

From PowerShell:

.\scripts\install-windows.ps1

The script copies target\release\imgcrop.exe to %LOCALAPPDATA%\Programs\Image Cropper, copies vcpkg runtime DLLs when VCPKG_ROOT is configured, and creates an Image Cropper Start-menu shortcut.

To remove it:

.\scripts\uninstall-windows.ps1

Tests

cargo test

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages