jalaljaberi / negarity
Negarity โ a modern, extensible image processing and graphics manipulation library for PHP.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/jalaljaberi/negarity
Requires
- php: >=8.2
- ext-gd: *
- ext-imagick: *
- jcupitt/vips: ^2.5
Requires (Dev)
- phpunit/phpunit: ^10.0
- symfony/var-dumper: ^6.0
This package is not auto-updated.
Last update: 2025-10-30 20:55:43 UTC
README
Negarity is a modern, extensible, and high-performance image processing library for PHP.
It aims to become the de facto standard for graphics manipulation, combining the flexibility of GD, the power of Imagick, and the elegance of a fluent API.
๐ Features
- ๐งฑ Modular architecture โ Core, Drivers, Operations, Effects, and more.
- โ๏ธ Multi-backend support (GD, Imagick, Vips, custom).
- ๐จ Fluent API for chaining image transformations.
- ๐ง Advanced tools: Extractors, Converters, Compositors, Generators.
- ๐งฉ Fully PSR-4 compliant, testable, and extensible.
- โก PHP 8.2+ optimized.
๐งฐ Installation
composer require jalaljaberi/negarity
๐งช Quick Start
use Negarity\Core\Image; use Negarity\Effects\Artistic\Sepia; use Negarity\Operations\Geometry\Resize; $image = Image::fromFile('photo.jpg') ->apply(new Resize(800, 600)) ->apply(new Sepia()) ->save('output.jpg');
Or using the processing pipeline:
use Negarity\Pipeline\ImageProcessor; use Negarity\Operations\Geometry\Resize; use Negarity\Effects\Artistic\Vignette; $processor = (new ImageProcessor()) ->add(new Resize(1024, 768)) ->add(new Vignette()); $processor->run('input.jpg', 'result.jpg');
๐งฑ Architecture Overview
Negarity follows a layered architecture:
Core โ Driver โ IO โ Generators โ Operations โ Extractors โ Converters โ
Compositors โ Analyzers โ Effects โ Pipeline
Each layer serves a specific purpose, from low-level pixel manipulation to high-level artistic effects.
๐งโ๐ป Development
Clone the repository and install dependencies:
git clone https://github.com/jalaljaberi/negarity.git
cd negarity
composer install
Run tests:
composer test
๐งฉ Contributing
Contributions are welcome!
Open issues, submit PRs, or suggest new effects and backends.
Please follow PSR-12 coding standards.
๐ License
MIT License โ see LICENSE for details.
๐ Author
Developed with โค๏ธ by Your Name
Follow me on GitHub