arnapou / image
Library - Image basic manipulations.
v1.0.1
2025-12-03 11:40 UTC
Requires
- php: ~8.3.0 || ~8.4.0 || ~8.5.0
Requires (Dev)
- ext-gd: *
- ext-imagick: *
- friendsofphp/php-cs-fixer: ^3.52
- phpstan/extension-installer: ^1.3
- phpstan/phpstan: ^2.0
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/php-code-coverage: ^12.0
- phpunit/phpunit: ^12.0
- symfony/serializer: ^6.4
README
This library is a simple tool to do basic image manipulations.
Installation
composer require arnapou/image
packagist 👉️ arnapou/image
Introduction
The goal of this library is to provide a very easy way to do basic manipulations of images like
- resizing
- watermarking
This is an opinionated abstraction around Imagick and GD
Main goal: "It just works !" effect.
use Arnapou\Image\PhpImage;
use Arnapou\Image\Geometry\Position;
use Arnapou\Image\Geometry\ResizeMode;
use Arnapou\Image\Geometry\Size;
use Arnapou\Image\Operation\Resize;
use Arnapou\Image\Operation\Watermark;
$phpImage = new PhpImage();
$phpImage->fileToFile(
source: '/src/file.jpg',
destination: '/dst/file.png',
operations: [
new Resize(new Size(200, 200), ResizeMode::Fill),
new Watermark('/path/watermark.png', Position::BottomRight),
],
quality: 90
);
Php versions
| Date | Ref | 8.5 | 8.4 | 8.3 |
|---|---|---|---|---|
| 28/11/2025 | 1.0.x, main | × | × | × |