2017 © Pedro Peláez
 

library image

Manipulate images with an expressive API

image

spatie/image

Manipulate images with an expressive API

  • Wednesday, July 4, 2018
  • by Spatie
  • Repository
  • 12 Watchers
  • 380 Stars
  • 504,036 Installations
  • PHP
  • 5 Dependents
  • 0 Suggesters
  • 34 Forks
  • 1 Open issues
  • 32 Versions
  • 30 % Grown

The README.md

Logo for image

Manipulate images with an expressive API

[![Latest Version on Packagist](https://img.shields.io/packagist/v/spatie/image.svg?style=flat-square)](https://packagist.org/packages/spatie/image) [![MIT Licensed](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md) [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/spatie/image/run-tests.yml?label=tests)](https://github.com/spatie/image/actions/workflows/run-tests.yml) [![Total Downloads](https://img.shields.io/packagist/dt/spatie/image.svg?style=flat-square)](https://packagist.org/packages/spatie/image)

Image manipulation doesn't have to be hard. Here are a few examples on how this package makes it very easy to manipulate images., (*1)

use Spatie\Image\Image;

// modifying the image so it fits in a 100x100 rectangle without altering aspect ratio
Image::load($pathToImage)
   ->width(100)
   ->height(100)
   ->save($pathToNewImage);

// overwriting the original image with a greyscale version   
Image::load($pathToImage)
   ->greyscale()
   ->save();

// make image darker and save it in low quality
Image::load($pathToImage)
   ->brightness(-30)
   ->quality(25)
   ->save();

// rotate the image and sharpen it
Image::load($pathToImage)
   ->orientation(90)
   ->sharpen(15)
   ->save();

You'll find more examples in the full documentation., (*2)

Support us

, (*3)

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products., (*4)

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall., (*5)

Installation

You can install the package via composer:, (*6)

``` bash composer require spatie/image, (*7)


Please note that since version 1.5.3 this package requires exif extension to be enabled: http://php.net/manual/en/exif.installation.php ## Usage Head over to [the full documentation](https://spatie.be/docs/image). ## Changelog Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. ## Testing ``` bash npm i pixelmatch composer test

Contributing

Please see CONTRIBUTING for details., (*8)

Security

If you've found a bug regarding security please mail security@spatie.be instead of using the issue tracker., (*9)

Postcardware

You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using., (*10)

Our address is: Spatie, Kruikstraat 22, 2018 Antwerp, Belgium., (*11)

We publish all received postcards on our company website., (*12)

Credits

Large parts of this codebase were copied from Intervention Image by Oliver Vogel, and modified for readability and to fit our needs., (*13)

License

The MIT License (MIT). Please see License File for more information., (*14)

The Versions

07/05 2018

dev-image-generation-exception

dev-image-generation-exception https://github.com/spatie/image

Manipulate images with an expressive API

  Sources   Download

MIT

The Requires

 

The Development Requires

image spatie

18/04 2018
01/03 2018
05/07 2017

dev-analysis-z9yxYN

dev-analysis-z9yxYN https://github.com/spatie/image

Manipulate images with an expressive API

  Sources   Download

MIT

The Requires

 

The Development Requires

image spatie

04/07 2017

dev-replace-optimizer

dev-replace-optimizer https://github.com/spatie/image

Manipulate images with an expressive API

  Sources   Download

MIT

The Requires

 

The Development Requires

image spatie

29/06 2017

1.2.1

1.2.1.0 https://github.com/spatie/image

Manipulate images with an expressive API

  Sources   Download

MIT

The Requires

 

The Development Requires

image spatie

17/04 2017

1.2.0

1.2.0.0 https://github.com/spatie/image

Manipulate images with an expressive API

  Sources   Download

MIT

The Requires

 

The Development Requires

image spatie

08/04 2017

1.1.3

1.1.3.0 https://github.com/spatie/image

Manipulate images with an expressive API

  Sources   Download

MIT

The Requires

 

The Development Requires

image spatie

04/04 2017

1.1.2

1.1.2.0 https://github.com/spatie/image

Manipulate images with an expressive API

  Sources   Download

MIT

The Requires

 

The Development Requires

image spatie

21/03 2017

1.1.1

1.1.1.0 https://github.com/spatie/image

Manipulate images with an expressive API

  Sources   Download

MIT

The Requires

 

The Development Requires

image spatie

14/03 2017

1.1.0

1.1.0.0 https://github.com/spatie/image

Manipulate images with an expressive API

  Sources   Download

MIT

The Requires

 

The Development Requires

image spatie

06/02 2017

1.0.0

1.0.0.0 https://github.com/spatie/image

Manipulate images with an expressive API

  Sources   Download

MIT

The Requires

 

The Development Requires

image spatie

04/02 2017

0.0.6

0.0.6.0 https://github.com/spatie/image

Manipulate images with an expressive API

  Sources   Download

MIT

The Requires

 

The Development Requires

image spatie

02/02 2017

0.0.5

0.0.5.0 https://github.com/spatie/image

Manipulate images with an expressive API

  Sources   Download

MIT

The Requires

 

The Development Requires

image spatie

02/02 2017

0.0.4

0.0.4.0 https://github.com/spatie/image

Manipulate images with an expressive API

  Sources   Download

MIT

The Requires

 

The Development Requires

image spatie

01/02 2017

0.0.3

0.0.3.0 https://github.com/spatie/image

Manipulate images with an expressive API

  Sources   Download

MIT

The Requires

 

The Development Requires

image spatie

31/01 2017

0.0.1

0.0.1.0 https://github.com/spatie/image

Manipulate images with an expressive API

  Sources   Download

MIT

The Requires

 

The Development Requires

image spatie