guanhui07 / image
PHP image manipulation
Fund package maintenance!
Intervention
Ko Fi
paypal.me/interventionio
Requires
- php: ^8.1
- ext-mbstring: *
- intervention/gif: ^4.1
Requires (Dev)
- mockery/mockery: ^1.6
- phpstan/phpstan: ^1
- phpunit/phpunit: ^10.0
- slevomat/coding-standard: ~8.0
- squizlabs/php_codesniffer: ^3.8
Suggests
- ext-exif: Recommended to be able to read EXIF data properly.
- dev-develop
- 3.8.0
- 3.7.2
- 3.7.1
- 3.7.0
- 3.6.5
- 3.6.4
- 3.6.3
- 3.6.2
- 3.6.1
- 3.6.0
- 3.5.1
- 3.5.0
- 3.4.0
- 3.3.3
- 3.3.2
- 3.3.1
- 3.3.0
- 3.2.4
- 3.2.3
- 3.2.2
- 3.2.1
- 3.2.0
- 3.1.0
- 3.0.2
- 3.0.1
- 3.0.0
- 3.0.0-rc.2
- 3.0.0-rc.1
- 3.0.0-beta.11
- 3.0.0-beta.10
- 3.0.0-beta.9
- 3.0.0-beta.8
- 3.0.0-beta.7
- 3.0.0-beta.6
- 3.0.0-beta.5
- 3.0.0-beta.4
- 3.0.0-beta.3
- 3.0.0-beta.2
- 3.0.0-beta.1
- 3.0.0-alpha.8
- 3.0.0-alpha.7
- 3.0.0-alpha.6
- 3.0.0-alpha.5
- 3.0.0-alpha.4
- 3.0.0-alpha.3
- 3.0.0-alpha.2
- 3.0.0-alpha.1
- 2.7.x-dev
- 2.7.2
- 2.7.1
- 2.7.0
- 2.6.1
- 2.6.0
- 2.5.1
- 2.5.0
- 2.4.3
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.14
- 2.3.13
- 2.3.12
- 2.3.11
- 2.3.10
- 2.3.9
- 2.3.8
- 2.3.7
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.17
- 2.0.16
- 2.0.15
- 2.0.14
- 2.0.13
- 2.0.12
- 2.0.11
- 2.0.10
- 2.0.9
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 2.0.0-beta.2
- 2.0.0-beta
- 1.6.x-dev
- 1.6.8
- 1.6.7
- 1.6.6
- 1.6.5
- 1.6.4
- 1.6.3
- 1.6.2
- 1.6.1
- 1.6.0
- 1.5.13
- 1.5.12
- 1.5.11
- 1.5.10
- 1.5.9
- 1.5.8
- 1.5.7
- 1.5.6
- 1.5.5
- 1.5.4
- 1.5.3
- 1.5.2
- 1.5.1
- 1.5.0
- 1.4.5
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.11
- 1.3.10
- 1.3.9
- 1.3.8
- 1.3.7
- 1.3.6
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.6
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.1
- 1.0.0
- dev-feature/stream
- dev-main
- dev-feature/fill-with-image
This package is auto-updated.
Last update: 2024-11-29 08:11:33 UTC
README
PHP Image Processing
Intervention Image is a PHP image processing library that provides a simple and expressive way to create, edit, and compose images. It features a unified API for the two most popular image manipulation extensions. You can choose between the GD library or Imagick as the base layer for all operations.
- Simple interface for common image editing tasks
- Interchangeable driver architecture
- Support for animated images
- Framework-agnostic
- PSR-12 compliant
Installation
You can easily install this library using Composer. Just request the package with the following command:
composer require intervention/image
Getting Started
Learn the basics on how to use Intervention Image and more with the official documentation.
Code Examples
use Intervention\Image\ImageManager; // create image manager with desired driver $manager = new ImageManager( new Intervention\Image\Drivers\Gd\Driver() ); // open an image file $image = $manager->read('images/example.gif'); // resize image instance $image->resize(height: 300); // insert a watermark $image->place('images/watermark.png'); // encode edited image $encoded = $image->toJpg(); // save encoded image $encoded->save('images/example.jpg');
Requirements
- PHP >= 8.1
Supported Image Libraries
- GD Library
- Imagick PHP extension
Security
If you discover any security related issues, please email oliver@intervention.io directly.
Authors
This library is developed and maintained by Oliver Vogel
Thanks to the community of contributors who have helped to improve this project.
License
Intervention Image is licensed under the MIT License.