Skip to content

Intervention/image-driver-vips

Repository files navigation

image-driver-vips

libvips driver for Intervention Image

Latest Version Build Status Monthly Downloads

WARNING: UNSTABLE

The code is in a very early and experimental stage of development. Many features are not yet implemented and tested. There may still be significant changes. Therefore, it is not recommended to use the driver in production environments.

Driver to use libvips with Intervention Image. Combines the easy-to-use API of Intervention Image with the technical performance of libvips.

Requirements

  • PHP >= 8.1
  • Intervention Image >= 3

Installation

You can easily install this library using Composer. Just request the package with the following command:

composer require intervention/image-driver-vips

Getting Started

The public API of Intervention Image can be used unchanged. The only configuration that needs to be done is to ensure that the libvips driver is used by Intervention\Image\ImageManager.

Code Examples

use Intervention\Image\ImageManager;
use Intervention\Image\Drivers\Vips\Driver as VipsDriver;

// create image manager with vips driver
$manager = ImageManager::withDriver(VipsDriver::class);

// 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');

Contributing

Check out the documentation

composer test

About

libvips driver for Intervention Image Version 3

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published