Skip to content

Conversation

@nedanwr
Copy link
Owner

@nedanwr nedanwr commented Jan 16, 2026

Description

This PR introduces comprehensive image processing capabilities to ForgeKit, enabling users to convert, resize, compress, strip metadata, and inspect images. The implementation uses libvips as the primary image processing engine for efficient, high-quality operations.

Key Features:

  • Image format conversion with quality control and compression
  • Image resizing with automatic aspect ratio preservation
  • Metadata stripping for privacy and file size reduction
  • Image compression with configurable quality levels
  • Image information display with optional EXIF metadata
  • Automatic output path derivation when not specified

Implementation Details:

  • Added LibvipsTool adapter for seamless integration with libvips
  • Implemented image format utilities for detection and conversion
  • Created comprehensive CLI commands for all image operations
  • Enhanced job executor to support image processing workflows
  • Streamlined implementation by removing ImageMagick in favor of libvips-only approach

Type of Change

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation only
  • refactor: Code refactoring (no behavior change)
  • perf: Performance improvement
  • test: Adding or updating tests
  • build: Build system or dependencies
  • ci: CI/workflow changes
  • chore: Maintenance tasks

Scope

  • cli - CLI commands and interface
  • core - Core library functionality
  • tools - Tool integrations (qpdf, ghostscript, etc.)
  • pdf - PDF-specific operations
  • packaging - Package configurations
  • Other:

Related Issues

Checklist

  • I have read the commit convention
  • My commits follow the conventional format: type(scope): description
  • I have added/updated tests as appropriate
  • All tests pass locally (cargo test)
  • Code passes lint checks (cargo clippy and cargo fmt)
  • I have updated documentation if needed

Breaking Changes

  • This PR contains breaking changes

This PR does not introduce breaking changes. It adds new functionality without modifying existing behavior.

Screenshots / Output

Example Usage

# Convert image format with compression
$ forgekit image convert photo.jpg -t webp --quality 80
Converting photo.jpg to photo.webp...
✓ Conversion complete: photo.webp

# Resize image
$ forgekit image resize photo.jpg --width 800
Resizing photo.jpg to 800px width...
✓ Resize complete: photo_800w.jpg

# Strip metadata
$ forgekit image strip photo.jpg
Stripping metadata from photo.jpg...
✓ Metadata stripped: photo_stripped.jpg

# Compress image
$ forgekit image compress photo.jpg --quality 60
Compressing photo.jpg...
✓ Compression complete: photo_compressed.jpg

# Display image information
$ forgekit image info photo.jpg --exif
Image: photo.jpg
Dimensions: 4032x3024
Format: JPEG
Size: 2.4 MB
EXIF Data:
  Camera: iPhone 13 Pro
  Date: 2024-01-15 14:30:22
  ...

…tions for conversion, resizing, and metadata stripping
…of `ImageMagick` and add compression parameter
…s and adding new tests for image compression
@nedanwr nedanwr self-assigned this Jan 16, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 16, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nedanwr nedanwr merged commit c17b6f6 into develop Jan 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants