Crop - Intelligent Image Cropping Library

A modern PHP library for intelligent image cropping with multiple algorithms. This is a maintained fork of the original stojg/crop library with modern improvements.

โœจ Key Features

๐Ÿš€ Quick Start

Installation

1
composer require drzippie/crop

Basic Usage

1
2
3
4
5
6
use drzippie\crop\CropEntropy;

// Create cropper and process image
$crop = new CropEntropy('path/to/image.jpg');
$result = $crop->resizeAndCrop(300, 200);
$result->writeImage('path/to/output.jpg');

๐Ÿ“Š Cropping Strategies

Strategy Description Best For
CropCenter Simple center-based cropping Fast processing, uniform crops
CropEntropy Edge-detection based cropping Preserving important details
CropBalanced Weighted center of interest Balanced composition

๐Ÿ“– Documentation

๐Ÿ”ง Requirements

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit issues and enhancement requests.

๐Ÿ“„ License

This project is licensed under the BSD-2-Clause License - see the LICENSE file for details.


This library is actively maintained and continues the legacy of the original stojg/crop project.