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

dev-main 2025-10-29 19:06 UTC

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