jalaljaberi/negarity
Composer 安装命令:
composer require jalaljaberi/negarity
包简介
Negarity — a modern, extensible image processing and graphics manipulation library for PHP.
README 文档
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
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-10-29